3v4l.org

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

preferences:
25.95 ms | 405 KiB | 5 Q