3v4l.org

run code in 300+ PHP versions simultaneously
<?php if ($_SERVER['REQUEST_METHOD'] == 'POST') { session_start(); $gebruikersnaam = $_POST['gebruikersnaam']; $emailadres = $_POST['emailadres']; $geboortedatum = date('d-m-Y',strtotime($_POST['geboortedatum'])); $wachtwoord = $_POST['wachtwoord']; $wachtwoord2 = $_POST['wachtwoord2']; if (strlen($gebruikersnaam) < 3 OR strlen($gebruikersnaam) > 20) { die("Uw gebruikersnaam ($gebruikersnaam) moet minimaal 3 en mag maximaal 20 tekens bevatten."); } elseif (filter_var($emailadres, FILTER_VALIDATE_EMAIL) == FALSE OR strlen($emailadres) > 45) { die("Voer alstublieft een correct e-mailadres in, deze mag maximaal 45 tekens bevatten."); } list($year,$month,$day) = explode("-",$geboortedatum); $year_diff = date("Y") - $year; $month_diff = date("m") - $month; $day_diff = date("d") - $day; if ($day_diff < 0 || $month_diff < 0) $year_diff--; elseif ($year_diff < 13) { die("Sorry, de minimumleeftijd is 13 jaar oud."); } elseif ($wachtwoord != $wachtwoord2) { die("Sorry, de wachtwoorden komen niet overeen."); } elseif ( ($_REQUEST["txtCaptcha"] == $_SESSION["security_code"]) && (!empty($_REQUEST["txtCaptcha"]) && !empty($_SESSION["security_code"])) ) { echo "<h1>Captcha goed ingevuld!</h1>"; } else { echo "<h1>Captcha niet goed ingevuld.</h1>"; } } else { header('Location: index.php'); } ?>
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
Warning: Undefined array key "REQUEST_METHOD" in /in/q30CB on line 2 Warning: Cannot modify header information - headers already sent by (output started at /in/q30CB:2) in /in/q30CB on line 34
Output for 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 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.25, 7.4.27 - 7.4.33
Notice: Undefined index: REQUEST_METHOD in /in/q30CB on line 2 Warning: Cannot modify header information - headers already sent by (output started at /in/q30CB:2) in /in/q30CB on line 34
Output for 7.3.32 - 7.3.33, 7.4.26
Output for 5.2.3 - 5.2.17
Notice: Undefined index: REQUEST_METHOD in /in/q30CB on line 2 Warning: Cannot modify header information - headers already sent by (output started at /in/q30CB:2) in /in/q30CB on line 34
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.2
Notice: Undefined index: REQUEST_METHOD in /in/q30CB on line 2

preferences:
256.53 ms | 402 KiB | 460 Q