3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = ['a', 'b', 'c']; var_dump(current($arr)); echo '--------aaaaaa--------', PHP_EOL; var_dump(end($arr)); var_dump(next($arr)); $abc = $arr; echo '--------bbbbbbb--------', PHP_EOL; var_dump(current($abc)); // false var_dump(current($abc)); // false var_dump(each($abc)); // not false??? var_dump(each($abc)); // not false??? var_dump(each($abc)); // not false??? echo '--------cccccccc--------', PHP_EOL;

preferences:
52.5 ms | 412 KiB | 5 Q