On 04/05/2017 13:51, Michael Morris wrote:
For what it's worth, the Drupal assertion inspector calls these "Strict
Arrays" since that's what they are - arrays in the true sense of the term
found in all other languages. What PHP is calling an "array" is more
accurately a "map" or "hash"

I'm not sure on that terminology. Many languages / environments have "sparse" arrays, arrays with negative indexes, and other variants. It's true that PHP's "array" type goes well beyond those, but we're talking about more than "non-associative" here (or I hope we are).

I think possibly the best term would be "list" - a collection where order is preserved, but there is no separate notion of keys: on a "list-like array", $foo[42] can be seen as "access the 43rd value", not "access the value with key 42".

Regards,

--
Rowan Collins
[IMSoP]


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to