3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

In PHP 5, is there a limit to the number of keys a single-dimensional array can have?

If so, can this be circumvented by a multi-dimensional array, or does it have the same limit as a single-dimensional?

2 answers
Jul 15, 2010. 9:09 AMNachoMahma says:
.  According to the manual, "It takes as parameters any number of comma-separated key => value pairs." (my emphasis) That tells me that the limit is dependent how much RAM you have, but I can't find confirmation of that.
Jul 15, 2010. 9:13 AMNachoMahma says:
.  PS: count() returns an integer.
.  According to the manual, "The size of an integer is platform-dependent, although a maximum value of about two billion is the usual value (that's 32 bits signed). 64-bit platforms usually have a maximum value of about 9E18. PHP does not support unsigned integer s. Integer size can be determined using the constant PHP_INT_SIZE, and maximum value using the constant PHP_INT_MAX since PHP 4.4.0 and PHP 5.0.5. "

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!