You are here
on php arrays
The main difference is that PHP defines arrays in a way that makes them generalized enough to suit all the major use cases instead of having multiple types. For example, in Python you have arrays and you also have dicts. Not to mention you also have tuples on top of that, which a lot of people will couple with a list in order to achieve something similar to what a PHP array represents. PHP, however, only has a single type called array that behaves more like a dict would in Python, but still shares many of the characteristics of arrays in other languages. It’s a hybrid of both, really.