What are Iterables in PHP and why do we use it?
1 answer
This might help wiki.php.net/rfc/iterable
The main advantage iterable
is that a class, method, or function parameter can be declared iterable
but not implementation-specific, i.e. array, Iterator, Generator, etc. Thus, whatever is iterable
, can.
+1
source to share