3v4l.org

run code in 300+ PHP versions simultaneously
<?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>"; }

preferences:
37.97 ms | 402 KiB | 5 Q