6 ms·
The problem is PHP calling an ordered map an array. Array in pretty much every other language means a sequence indexed by integers. Ideally the maintainers of
by cliffy 7y ago
The problem is PHP calling an ordered map an array. Array in pretty much every other language means a sequence indexed by integers.
Ideally the maintainers of PHP would rename it and deprecate the use of `array()` over a long period of time.
- zeroimpl 7y agoThe PHP documentation refers to them as "associative arrays", which is technically correct, but I agree I'm not sure how they could have conflated these concepts so badly.
- tyingq 7y agoI believe the "associative array" terminology came from Perl. Though Perl's associative arrays don't have any guaranteed order. And Perl also has normal arrays.