3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $nameErr= $surnameErr = ""; $name= $surname = ""; $errors= ""; if ($_SERVER["REQUEST_METHOD"] == "POST") { if(empty($_POST['customer_name'])){ $errors[] = "Please provide with real human being name"; } if(count($errors)>0) $errors = implode('<br />',$errors); } function test_input($data) { $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); return $data; } ?>
Output for 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Notice: Undefined index: REQUEST_METHOD in /in/6RYdh on line 5
Output for 4.3.0 - 5.2.17
Notice: Undefined index: REQUEST_METHOD in /in/6RYdh on line 5