Np. ArrayIterator/ArrayObject za pomocą konstrukcji:
<?php ?>
Ta mi nie działa?
<?php ?>
<?php class x implements Iterator, Countable { private $position = 0; "firstelement", "secondelement", "lastelement", ); public function __construct() { $this->position = 0; } $this->position = 0; } return $this->array[$this->position]; } return $this->position; } ++$this->position; } function valid() { } return 6; } } $x = new x; ?>