?>
<html>
<head>
<title>Online PHP Script Execution</title>
</head>
<body>
<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>
<?php
- Output for 7.4.3 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
- ?>
<html>
<head>
<title>Online PHP Script Execution</title>
</head>
<body>
<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>
</body>
</html>
- Output for 5.4.0 - 5.4.32, 7.3.32 - 7.3.33
- Parse error: syntax error, unexpected end of file in /in/4WqXn on line 33
Process exited with code 255. - Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 7.2.29 - 7.2.33, 7.3.16 - 7.3.31
- ?>
<html>
<head>
<title>Online PHP Script Execution</title>
</head>
<body>
<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>
</body>
</html>
<?php
preferences:
179.16 ms | 404 KiB | 255 Q