I got foiled by PHP's deceptive Frankenstein “dictionary or list” ARR (cont)
vazaha.blog
vazaha.blog
There's an odd departure towards the end where the author talks about JSON-to-array conversions and vice versa. Unsurprisingly, this can't always work, not only because of the keying issue that the author mentions, but also because PHP supports objects, references, anonymous functions, and other things that JSON simply can't support.
Weirder than that. They're ordered hash tables. The order of keys in a PHP array isn't arbitrary, like dictionaries/hashes/maps in various other languages; it's based on the order that keys are added, and can be explicitly manipulated with functions like ksort().
[1] https://docs.python.org/3.6/whatsnew/3.6.html#new-dict-imple...