(PHP 5 >= 5.1.0)
iterator_count — Count the elements in an iterator
Count the elements in an iterator.
The iterator being counted.
The number of elements in iterator.
Пример #1 iterator_count() example
<?php$iterator = new ArrayIterator(array('recipe'=>'pancakes', 'egg', 'milk', 'flour'));var_dump(iterator_count($iterator));?>
Результат выполнения данного примера:
int(4)