3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $color = array('white', 'green', 'red'); foreach ($color as $c) { echo "$c, "; } sort($color); echo "<ul>"; foreach ($color as $y) { echo "_$y_"; } echo "</ul>"; ?>
Output for 5.0.4 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
white, green, red, <ul> Notice: Undefined variable: y_ in /in/XQT5B on line 11 _ Notice: Undefined variable: y_ in /in/XQT5B on line 11 _ Notice: Undefined variable: y_ in /in/XQT5B on line 11 _</ul>
Output for 4.3.0 - 5.0.3
white, green, red, <ul> Notice: Undefined variable: y_ in /in/XQT5B on line 11 _ Notice: Undefined variable: y_ in /in/XQT5B on line 11 _ Notice: Undefined variable: y_ in /in/XQT5B on line 11 _</ul>