> On Nov 17, 2019, at 17:28, Mike Schinkel <[email protected]> wrote: > > If we are going to open up arrays for enhancement in PHP 8 I would ask that > we seriously consider addressing the various differences between a built-in > array and an instance of ArrayObject and/or the related associated interfaces > such that the objects can be used interchangeably with a built-in array
I completely agree. I would love to see anything implementing ArrayAccess able to be used in any of the array functions. This might be a way-out-in-left-field concept, but if we went down this path, perhaps a PHP array could become an object internally (i.e., ArrayObject) without changing the way it works in existing code? Then, if/when generics are introduced, a PHP array would already be a class to which a generic type parameter could be applied. -Ben -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
