On Fr, 2017-03-17 at 04:02 -0300, David Rodrigues wrote: > I guess that a lot of PHP functions that could be replaced by a > Generator (basically all array functions like array_values(), > array_keys(), etc). > But there are a big question: could it be applied to any case? It will > be faster than just an array? Certainly it will be more memory > optimized.
It's quite complicated - these new functions would have to keep a copy/reference of the original array. Also we'd have to allow iterators as parameter for array functions and we couldn't do everything, as result of some of these array functions are stuck into other array routines etc. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php