3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = ArrayIterator(array(1)); var_dump($arr->current()); $iter = new LimitIterator($arr, 0, 1); var_dump($arr->current());

preferences:
29.47 ms | 402 KiB | 5 Q