3 ms·
It was an associative array all along, PHP just hides that from you. The Array is such a quirky data structure, it takes int or string keys, but numeric string
by greenshackle2 6y ago
It was an associative array all along, PHP just hides that from you. The Array is such a quirky data structure, it takes int or string keys, but numeric string keys ("1", etc.) are silently converted to int. It's never a real array, the implementation under the hood is a hash table.