iterator_apply
iterator_to_array
SPL Functions
PHP Manual

# iterator_count

(PHP 5 >= 5.1.0)

iterator_count — Count the elements in an iterator

### Descripción

int iterator_count ( Traversable `$iterator` )

Count the elements in an iterator.

### Lista de parámetros

`iterator`

  The iterator being counted.

### Valores retornados

The number of elements in `iterator` .

### Ejemplos

Example #1 iterator_count() example

`<?php
$iterator = new ArrayIterator(array('recipe'=>'pancakes', 'egg', 'milk', 'flour'));
var_dump(iterator_count($iterator));
?>`

El resultado del ejemplo seria:

    int(4)

iterator_apply
iterator_to_array
SPL Functions
PHP Manual