3v4l.org

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

preferences:
60.53 ms | 402 KiB | 5 Q