5 ms·
PHP lets you treat arrays and hashes exactly the same (or at least it used to) but I don't know if it switches the underlying data structures/algos based on usa
by mooreds 5y ago
PHP lets you treat arrays and hashes exactly the same (or at least it used to) but I don't know if it switches the underlying data structures/algos based on usage.
- scotty79 5y agoI always considered it to be a very good decission in the design of PHP language.
- aszen 5y agoThis was a terrible decision, it causes so many functions to have different arguments to handle both data structures. It also slower performance wise
- scotty79 5y agoSince it's a scripting language made first and formost for accesibility not for speed it was a great decission. Because you could create nearly all the data structures you needed using just array() and many of them superbly easily.