3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (isset($_POST['calc'])) { $m=$_POST['mat']; $e=$_POST['da']; $s=$_POST['eng']; $f=$_POST['fys']; $h=$_POST['bio']; $p=$_POST['geo']; $ave=($m+$e+$s+$f+$h+$p)/; } ?> <a href="" onclick="return hs.htmlExpand(this, { headingText: 'Beregn dit Gennemsnit:' })"> <b>Beregn dit Gennemsnit:&nbsp;&nbsp; <?php echo $ave;?></b><br></br> </a> <div class="highslide-maincontent"> <form id="gennemsnit" name="form1" method="post" action=""> Matematik<input name="math" type="text" id="mat" size="3" maxlength="4" /><br /> Dansk<input name="eng" type="text" id="da" size="3" maxlength="4" /><br /> Engelsk<input name="sci" type="text" id="eng" size="3" maxlength="4" /><br /> Fysik<input name="fil" type="text" id="fys" size="3" maxlength="4" /><br /> Biologi<input name="he" type="text" id="bio" size="3" maxlength="4" /><br /> Geografi<input name="pe" type="text" id="geo" size="3" maxlength="4" /></td><br /> <input name="calc" type="submit" id="calc" value="Beregn"/><br /><br /> </form>
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/NRmjb on line 10
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/NRmjb on line 10
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/NRmjb on line 10
Process exited with code 255.

preferences:
240.8 ms | 1395 KiB | 123 Q