3v4l.org

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