3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $i = new ArrayIterator(); $i->offsetSet(0, 0); print_r($i->current()); $i->next(); print_r($i); print_r($i->current()); print_r(count($i));
based on XKVP5
Output for 7.0.0 - 7.2.0
0ArrayIterator Object ( [storage:ArrayIterator:private] => Array ( [0] => 0 ) ) 1
Output for 5.3.21 - 5.6.28
ArrayIterator Object ( [storage:ArrayIterator:private] => Array ( [0] => 0 ) ) 1