iterator_count
PHP 5 >= 5.1.0, PHP 7, PHP 8
iterator_count - Count the elements in an iterator
Example #1 iterator_count modifies position
Result: string(3) "one"
int(3)
NULL
Example #2 iterator_count example
Result: int(4)
Example #3 iterator_count in foreach loops
Result: 0: one (3)