3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $books["978-0743261690"] = "Gilgamesh"; $books["978-0060931957"] = "The Odyssey"; $books["978-0192840509"] = "Aesop's Fables"; $books["978-0520227040"] = "Mahabharta"; $books["978-0393320978"] = "Beowulf"; ?><html> <head> <title>Five Great Books</title> </head> <body> <h1>Five Great Books</h1> <ul> <?php foreach($books as $isbn) { ?> <li><?php echo $books[$isbn]; ?></li> <?php } ?> </ul> </body> </html>
based on iUZMU
Output for 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
<html> <head> <title>Five Great Books</title> </head> <body> <h1>Five Great Books</h1> <ul> <li> Notice: Undefined index: Gilgamesh in /in/FNnFK on line 17 </li> <li> Notice: Undefined index: The Odyssey in /in/FNnFK on line 17 </li> <li> Notice: Undefined index: Aesop's Fables in /in/FNnFK on line 17 </li> <li> Notice: Undefined index: Mahabharta in /in/FNnFK on line 17 </li> <li> Notice: Undefined index: Beowulf in /in/FNnFK on line 17 </li> </ul> </body> </html>
Output for 4.3.0 - 5.2.17
<html> <head> <title>Five Great Books</title> </head> <body> <h1>Five Great Books</h1> <ul> <li> Notice: Undefined index: Gilgamesh in /in/FNnFK on line 17 </li> <li> Notice: Undefined index: The Odyssey in /in/FNnFK on line 17 </li> <li> Notice: Undefined index: Aesop's Fables in /in/FNnFK on line 17 </li> <li> Notice: Undefined index: Mahabharta in /in/FNnFK on line 17 </li> <li> Notice: Undefined index: Beowulf in /in/FNnFK on line 17 </li> </ul> </body> </html>