3v4l.org

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

preferences:
101.94 ms | 1412 KiB | 5 Q