3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xs = array(3, 4, 5, 7); $xs2 = new ArrayObject($xs); $it = $xs2->getIterator(); $it->rewind(); printf("%d\n", current($it)); $it->next(); printf("%d\n", current($it));

preferences:
51.59 ms | 402 KiB | 5 Q