3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
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 hhvm-3.10.0 - 3.12.0
Notice: Undefined index: REQUEST_METHOD in /in/q30CB on line 2
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 - 5.2.2
Notice: Undefined index: REQUEST_METHOD in /in/q30CB on line 2