A random question that crossed my mind:
If I define an array in PHP like this:
$arr = Array();
$arr[7392171] = "some value";
How is it stored inside? Does key 7392171 display “some value” or does it work like JavaScript and put 7392170 empty values in front of it?
I guess this is the first because indexed and associative arrays are the same (at least from my understanding) and comparable to objects in JavaScript.
So yes, just interesting :)
source
share