3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $mylist = array("thing1" => "Balloon", "thing2" => "Cat", "thing3" => "Egg", "thing4" => "Dog", "thing5" => "Apple"); asort($mylist); foreach($mylist as $id => $value) { $id = htmlentities($id, ENT_QUOTES); $value = htmlentities($value); echo "<div id='{$id}'>{$value}</div>"; }
Output for 4.3.2 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
<div id='thing5'>Apple</div><div id='thing1'>Balloon</div><div id='thing2'>Cat</div><div id='thing4'>Dog</div><div id='thing3'>Egg</div>
Output for 4.3.0 - 4.3.1

Process exited with code 139.