3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // define variables and set to empty values $name = $email = $gender = $comment = $website = ""; if ($_SERVER["REQUEST_METHOD"] == "POST") { $name = test_input($_POST["name"]); $email = test_input($_POST["email"]); $website = test_input($_POST["website"]); $comment = test_input($_POST["comment"]); $gender = test_input($_POST["gender"]); } function test_input($data) { $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); return $data; } ?>
Output for 5.3.0 - 5.6.30, hhvm-3.10.1 - 3.21.3, 7.0.0 - 7.1.12
Notice: Undefined index: REQUEST_METHOD in /in/SjXaQ on line 5
Output for hhvm-3.22.0
Notice: Undefined index: REQUEST_METHOD in /in/SjXaQ on line -1
Output for 4.3.0 - 5.2.17
Notice: Undefined index: REQUEST_METHOD in /in/SjXaQ on line 5