| Start |
|---|
SplFixedArray Difference from PHP ArrayPHP's default Array type is actually implemented as ordered hash maps, which allow us to create arrays that consist of key/value pairs where values can be of any type and keys can be either numbers or strings. This is not traditionally how arrays are created, however. So as you can see from this illustration a normal PHP array can be viewed more like an an ordered set of key/value pairs, where each key can map to any value. Notice in this array we have keys that are both numbers and strings, as well as values of different types and the key has no bearing on the order of the elements. So the above code would give us exactly what we'd expect. This gives you what you would expect. Gives us... Now we get... |
Read Article
https://develop.horje.com/learn/1434/reference