3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $color = array('white', 'green', 'red'); foreach($color as $c) { echo "$c".","; } $test = sort($color); echo "<ul>"; foreach($test as $t) { echo "<li>$t</li>"; } echo "</ul>"; ?>
based on 5eCQi
Output for 4.3.0 - 4.3.10, 4.4.0 - 5.6.28, 7.0.0 - 7.1.0
white,green,red,<ul> Warning: Invalid argument supplied for foreach() in /in/riZcl on line 10 </ul>
Output for hhvm-3.10.0 - 3.12.0
white,green,red,<ul> Warning: Invalid argument supplied for foreach() in /in/riZcl on line 12 </ul>
Output for 4.3.11
white,green,red,<ul></ul>