3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $color = array('white','green','red'); foreach($color as $key=>$val) { echo $val.","; } $color1 = sort($color); foreach($color1 as $key=>$val) { echo "<ul>"; echo "<li>"; echo $val; echo "</li>"; echo "</ul>"; }
based on v16W6
Output for 4.3.0 - 4.3.10, 4.4.0 - 7.1.0
white,green,red, Warning: Invalid argument supplied for foreach() in /in/at7Oe on line 8
Output for 4.3.11
white,green,red,