3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $list = array("A","B","C","D"); foreach ( $list as $var ) { print($list[$var]); } function item($list) { return current($list); } ?>
Output for 5.3.0 - 7.1.0
Notice: Undefined index: A in /in/AMegI on line 6 Notice: Undefined index: B in /in/AMegI on line 6 Notice: Undefined index: C in /in/AMegI on line 6 Notice: Undefined index: D in /in/AMegI on line 6
Output for 4.3.0 - 5.2.17
Notice: Undefined index: A in /in/AMegI on line 6 Notice: Undefined index: B in /in/AMegI on line 6 Notice: Undefined index: C in /in/AMegI on line 6 Notice: Undefined index: D in /in/AMegI on line 6