3v4l.org

run code in 300+ PHP versions simultaneously
<html> <head> <title>Mailformulier </title> </head> <body> <?php ini_set("SMTP", "mail.live.com"); ini_set("smtp_poort", 25); ini_set("sendmail_from", "mailadres"); if($_POST["verzendbutton"] != "verzenden" || !$_POST["naam"] || !$_POST["mailadres"] || !$_POST["reactie"]) { // dus als het formulier leeg is of de waarde niet zijn ingevuld ?> <form action="mailform3.php" method = "post"> <?php if ($_POST["verzendbutton"] && !$_POST["naam"] && !$_POST["mailadres"] || !$_POST["reactie"]) { echo "<font color=\"red\"> Vul hier uw mailadres in</font><br>"; } ?> naam: <input type = "text" name = "naam" value ="<?php echo $_POST =["naam"] ?>"><br> <?php if ($_POST["verzendbutton"] && !$_POST["mailadres"]) { echo "<font color =\"red\"> Vul hier uw mailadres in!</font><br>"; } ?> E-mail: <input type = "text" name ="mailadres" value="<?php echo $_POST["mailadres"] ?>"><br> <?php if ($_POST["verzendbutton"] && !$_POST["reactie"]) { echo "<font color=\"red\">Vul hier uw reactie in!</font<br>"; } ?> Uw reactie": <textarea cols="30"rows ="4" name="reactie"><?php echo $_POST["reactie"] ?> </textarea> <input type = "submit" value ="verzenden" name ="verzendbutton"> </form> <?php } else { $boodschap = "Naam: ".$_POST["naam"]."\ncommentaar: ".$_POST["reacrie"]; mail($_POST["mailadres"], "Uw reactie van de website", $boodschap); echo "Bedankt ".$_POST["naam"].", fijn dat je mee wilde doen!"; } ?> </body> </html>
Output for 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>Mailformulier </title> </head> <body> Warning: Undefined array key "verzendbutton" in /in/l5vO3 on line 10 <form action="mailform3.php" method = "post"> Warning: Undefined array key "verzendbutton" in /in/l5vO3 on line 16 Warning: Undefined array key "reactie" in /in/l5vO3 on line 16 <font color="red"> Vul hier uw mailadres in</font><br>naam: <input type = "text" name = "naam" value =" Warning: Array to string conversion in /in/l5vO3 on line 20 Array"><br> Warning: Undefined array key "verzendbutton" in /in/l5vO3 on line 23 E-mail: <input type = "text" name ="mailadres" value=" Warning: Undefined array key "mailadres" in /in/l5vO3 on line 28 "><br> Warning: Undefined array key "verzendbutton" in /in/l5vO3 on line 30 Uw reactie": <textarea cols="30"rows ="4" name="reactie"> Warning: Undefined array key "reactie" in /in/l5vO3 on line 34 </textarea> <input type = "submit" value ="verzenden" name ="verzendbutton"> </form> </body> </html>
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.33
<html> <head> <title>Mailformulier </title> </head> <body> Notice: Undefined index: verzendbutton in /in/l5vO3 on line 10 <form action="mailform3.php" method = "post"> Notice: Undefined index: verzendbutton in /in/l5vO3 on line 16 Notice: Undefined index: reactie in /in/l5vO3 on line 16 <font color="red"> Vul hier uw mailadres in</font><br>naam: <input type = "text" name = "naam" value =" Notice: Array to string conversion in /in/l5vO3 on line 20 Array"><br> Notice: Undefined index: verzendbutton in /in/l5vO3 on line 23 E-mail: <input type = "text" name ="mailadres" value=" Notice: Undefined index: mailadres in /in/l5vO3 on line 28 "><br> Notice: Undefined index: verzendbutton in /in/l5vO3 on line 30 Uw reactie": <textarea cols="30"rows ="4" name="reactie"> Notice: Undefined index: reactie in /in/l5vO3 on line 34 </textarea> <input type = "submit" value ="verzenden" name ="verzendbutton"> </form> </body> </html>
Output for 7.3.32 - 7.3.33
<html> <head> <title>Mailformulier </title> </head> <body> <form action="mailform3.php" method = "post"> <font color="red"> Vul hier uw mailadres in</font><br>naam: <input type = "text" name = "naam" value ="Array"><br> E-mail: <input type = "text" name ="mailadres" value=""><br> Uw reactie": <textarea cols="30"rows ="4" name="reactie"> </textarea> <input type = "submit" value ="verzenden" name ="verzendbutton"> </form> </body> </html>
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40
<html> <head> <title>Mailformulier </title> </head> <body> Notice: Undefined index: verzendbutton in /in/l5vO3 on line 10 <form action="mailform3.php" method = "post"> Notice: Undefined index: verzendbutton in /in/l5vO3 on line 16 Notice: Undefined index: reactie in /in/l5vO3 on line 16 <font color="red"> Vul hier uw mailadres in</font><br>naam: <input type = "text" name = "naam" value =" Notice: Array to string conversion in /in/l5vO3 on line 21 Array"><br> Notice: Undefined index: verzendbutton in /in/l5vO3 on line 23 E-mail: <input type = "text" name ="mailadres" value=" Notice: Undefined index: mailadres in /in/l5vO3 on line 28 "><br> Notice: Undefined index: verzendbutton in /in/l5vO3 on line 30 Uw reactie": <textarea cols="30"rows ="4" name="reactie"> Notice: Undefined index: reactie in /in/l5vO3 on line 34 </textarea> <input type = "submit" value ="verzenden" name ="verzendbutton"> </form> </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
Parse error: syntax error, unexpected '[' in /in/l5vO3 on line 20
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/l5vO3 on line 20
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/l5vO3 on line 20
Process exited with code 255.

preferences:
292.86 ms | 401 KiB | 459 Q