PHP中的多维数组大小限制 [英] Multidimensional Array Size Limit in PHP

查看:181
本文介绍了PHP中的多维数组大小限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究一个函数,最终将大量维添加到数组中,我想知道是否可以达到可以添加多少维的限制,如果可以,那是什么?限制在PHP中?

I was working on a function, that ends up adding a massive amounts of dimensions to an array, and I was wondering, is it possible to reach a limit on how many dimensions can be added, and if so, what is that limit in PHP?

推荐答案

不,我认为访问深度没有限制(节省多少内存).

No, I don't believe there's a limit to the depth of access (save for how much RAM you've got).

不过,每个级别都至少增加了一个指针间接寻址,因此,随着元素的深入,检索元素的速度将受到影响.

Each level adds at least one pointer indirection, though, so the speed of retrieving elements will suffer as you get deeper.

我愿意赌美元给甜甜圈,这是一种更简单的方法来存储和处理您认为需要此超级数组的数据.

I'd be willing to bet dollars to donuts there's an easier way to store and manipulate the data you think you need this super-array for.

这篇关于PHP中的多维数组大小限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆