3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [1,2,3]; $iterator = (new ArrayObject($array))->getIterator(); var_dump(current($iterator));

preferences:
54.47 ms | 1411 KiB | 5 Q