RFC: Make the iterator_*() family accept all iterables

Project Governance
Author
Tim Düsterhus
Target
8.2
PHP's iterator_*() family currently only accept \Traversables (i.e. they reject plain arrays). This is unnecessarily limiting.

iterator_to_array: Change the type of iterator_to_array()’s $iterator parameter from \Traversable to iterable?

Overall Results

Yes
No
Yes
17 Votes (89%)
No
2 Votes (11%)

Voting Timeline

Dates based on UTC

Voting Breakdown

iterator_count: Change the type of iterator_count()’s $iterator parameter from \Traversable to iterable?

Overall Results

Yes
No
Yes
17 Votes (89%)
No
2 Votes (11%)

Voting Timeline

Dates based on UTC

Voting Breakdown