3v4l.org

run code in 300+ PHP versions simultaneously
<?php $list = array("A","B","C","D"); foreach ( $list as $var ) { print(item($list)); } function item($list) { return current($list); } ?>

preferences:
23.95 ms | 404 KiB | 5 Q