Re: [PHP-DEV] [RFC][Discussion] iterable_to_array() and iterable_count()

2018-07-01 Thread Michael Moravec
Hi Johannes, 2018-06-20 18:40 GMT+02:00 Johannes Schlüter : > > Is there any reason not to extend the existing functions to also allow > arrays? > Yes, this was discussed in the PR on GitHub: https://github.com/php/php-src/pull/3293#issuecomment-397082988 There are two main reasons to not do th

Re: [PHP-DEV] [RFC][Discussion] iterable_to_array() and iterable_count()

2018-06-20 Thread Johannes Schlüter
On Mi, 2018-06-20 at 03:55 +0200, Michael Moravec wrote: > Hello internals, > > I'd like to propose two new functions for PHP 7.3: > iterable_to_array() and > iterable_count() > > These functions are supposed to work with iterables (7.1 pseudotype) > - both arrays and iterators, unlike iterator_*

[PHP-DEV] [RFC][Discussion] iterable_to_array() and iterable_count()

2018-06-19 Thread Michael Moravec
Hello internals, I'd like to propose two new functions for PHP 7.3: iterable_to_array() and iterable_count() These functions are supposed to work with iterables (7.1 pseudotype) - both arrays and iterators, unlike iterator_*() functions which only work with iterators. Here's an RFC for this: htt