note
hobbs
Basically every "array" in PHP is an array <i>and</i> a hash, glued together. All of the values are stored in the hash as key/value pairs, but there's an array stored along with it that gives an ordering to the keys. The thing is, most of the time you either need one behavior (in-order processing) or the other (random lookup), and not <i>both</i>. PHP is giving you the overhead of both at all times; Perl is requiring you to say which one you really want. In the case where you really do need both methods, it's not very hard to set up the necessary parallel data structure in your own code, but <c>Tie::IxHash</c> is another option.
784449
784449