Reputation: 619
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?
Upvotes: 3
Views: 3353
Reputation: 98559
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.
Upvotes: 2