3v4l.org

run code in 300+ PHP versions simultaneously
<html> <head> <title>Online PHP Script Execution</title> </head> <body> <?php <form method="post" action="#"> Glasses of Milk: <input type="text" name="milk"/><br /> How many eggs: <input type="text" name="egg"/><br /> Spoons of sugar: <input type="text" name="sugar"/><br /> Cups of flour: <input type="text" name="flour"/><br /> <input type="submit" value="submit" name="sub" /> <br /><br /> </form> <?php function cake($milk, $egg, $sugar, $flour) { echo "In your cake you'll have: \n" . $milk . " glasses of milk, \n" . $egg . " eggs, \n". $sugar . "spoons of sugar\n " . $flour . " cups of" . " flour"; $t = $milk + $egg + $sugar + $flour; echo "\n\nPut 'em all in a bowl, mix it up, put it in the oven for ". $t . " minutes and put the oven o 180 degrees. Then put it in the fridge for ". $t*4 . " minutes. Then eat it!"; } if( isset($_POST['sub'])) { cake($_POST['milk'], $_POST['egg'], $_POST['sugar'], $_POST['flour']); } ?> </body> </html>
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.32
Parse error: syntax error, unexpected '<' in /in/NaN6Z on line 8
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '<' in /in/NaN6Z on line 8
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/NaN6Z on line 8
Process exited with code 255.

preferences:
220.91 ms | 1386 KiB | 123 Q