iterator_count

PHP 5 >= 5.1.0, PHP 7, PHP 8
iterator_count - Count the elements in an iterator
Manual
Code Examples

iterator_count( Traversable$iterator ): int

Count the elements in an iterator. iterator_count is not guaranteed to retain the current position of the iterator.

Parameters

iterator

The iterator being counted.

Return Values

The number of elements in iterator.

Example of iterator_count

Show all examples for iterator_count

PHP Version:


Function iterator_count:

Standard PHP Library (SPL) Functions

Most used PHP functions