3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<html> <head> <title>A BASIC HTML FORM</title> <?PHP function Hello($inName) { print "Hello " + $inName; } $username = $_POST['username']; print ($username); Hello($username); if ($username == "Tom") { print "Welcome Back"; } ?> </head> <body> <FORM NAME ="form1" METHOD ="POST" ACTION = "t1.php"> <INPUT TYPE = "TEXT" VALUE ="First Name"NAME="username"> <INPUT TYPE = "Submit" Name = "Submit1" VALUE = "Login"> </FORM> </body> </html>
Output for 7.1.0
<html> <head> <title>A BASIC HTML FORM</title> Notice: Undefined index: username in /in/vBSF3 on line 9 Warning: A non-numeric value encountered in /in/vBSF3 on line 7 0 </head> <body> <FORM NAME ="form1" METHOD ="POST" ACTION = "t1.php"> <INPUT TYPE = "TEXT" VALUE ="First Name"NAME="username"> <INPUT TYPE = "Submit" Name = "Submit1" VALUE = "Login"> </FORM> </body> </html>
Output for 5.3.0 - 7.0.14
<html> <head> <title>A BASIC HTML FORM</title> Notice: Undefined index: username in /in/vBSF3 on line 9 0 </head> <body> <FORM NAME ="form1" METHOD ="POST" ACTION = "t1.php"> <INPUT TYPE = "TEXT" VALUE ="First Name"NAME="username"> <INPUT TYPE = "Submit" Name = "Submit1" VALUE = "Login"> </FORM> </body> </html>
Output for 4.3.0 - 5.2.17
<html> <head> <title>A BASIC HTML FORM</title> Notice: Undefined index: username in /in/vBSF3 on line 9 0 </head> <body> <FORM NAME ="form1" METHOD ="POST" ACTION = "t1.php"> <INPUT TYPE = "TEXT" VALUE ="First Name"NAME="username"> <INPUT TYPE = "Submit" Name = "Submit1" VALUE = "Login"> </FORM> </body> </html>