PHP 7's new hashtable implementation
This is probably not a popular opinion, but I believe that PHP's associative array is one of the best-designed data structures in programming languages.<p>Its main distinguishing property, as mentioned in this article, is that values can be indexed by key, but are still iterated in the order they were set. This is "do what I want" in so many cases that it's just nuts.<p>Sure, just as often it's just needless overhead, but as a programmer who prefers to reason about domain and not performance, I often don't care about that. I hate that many other languages, including C#, Ruby and Python, force me to choose between either an unordered map or a list of <i>(key, value)</i> tuples. EDIT: clearly, i'm behind the times with that remark. thanks commenters :-)<p>I wish more languages had a native data type like this. It scares me that <i>in practice</i> JS objects have the same property, but officially the iteration order is not specified.<p>(that said, PHP's choice to mix regular arrays and associative arrays into a single type strikes me as a bit odd. i've also never seen a good use case of arrays with mixed string/int keys)