3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<html> <body> <h1> PENJUMLAHAN </h1> <form method="post"> Nilai 1 = <input type="text" name="a" value="<?php echo $_POST["a"] ?>" required><br> Nilai 2 = <input type="text" name="b" value="<?php echo $_POST["b"] ?>" required><br> <?php $a=$_POST["a"]; $b=$_POST["b"]; $penjumlahan = $a+$b; echo "Hasil = $penjumlahan"; ?> <br><input type="submit" value="hasil"> </form> </body> </html>
Output for 5.3.0 - 7.2.0
<html> <body> <h1> PENJUMLAHAN </h1> <form method="post"> Nilai 1 = <input type="text" name="a" value=" Notice: Undefined index: a in /in/kLRTi on line 5 " required><br> Nilai 2 = <input type="text" name="b" value=" Notice: Undefined index: b in /in/kLRTi on line 6 " required><br> Notice: Undefined index: a in /in/kLRTi on line 8 Notice: Undefined index: b in /in/kLRTi on line 9 Hasil = 0<br><input type="submit" value="hasil"> </form> </body> </html>
Output for 4.3.0 - 5.2.17
<html> <body> <h1> PENJUMLAHAN </h1> <form method="post"> Nilai 1 = <input type="text" name="a" value=" Notice: Undefined index: a in /in/kLRTi on line 5 " required><br> Nilai 2 = <input type="text" name="b" value=" Notice: Undefined index: b in /in/kLRTi on line 6 " required><br> Notice: Undefined index: a in /in/kLRTi on line 8 Notice: Undefined index: b in /in/kLRTi on line 9 Hasil = 0<br><input type="submit" value="hasil"> </form> </body> </html>