3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php print_r($_GET); if($_GET["a"] === "") echo "a is an empty string\n"; if($_GET["a"] === false) echo "a is false\n"; if($_GET["a"] === null) echo "a is null\n"; if(isset($_GET["a"])) echo "a is set\n"; if(!empty($_GET["a"])) echo "a is not empty"; $offset = $argv[0]; // beware, no input validation! $query = $offset; echo $query; $offset='beware'; $query = $offset; echo $query; ?>
Output for 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( ) Notice: Undefined index: a in /in/e8qmN on line 3 Notice: Undefined index: a in /in/e8qmN on line 4 Notice: Undefined index: a in /in/e8qmN on line 5 a is null /in/e8qmNbeware
Output for 4.3.2 - 5.2.17
Array ( ) Notice: Undefined index: a in /in/e8qmN on line 3 Notice: Undefined index: a in /in/e8qmN on line 4 Notice: Undefined index: a in /in/e8qmN on line 5 a is null /in/e8qmNbeware
Output for 4.3.0 - 4.3.1
Array ( [/in/e8qmN] => ) Notice: Undefined index: a in /in/e8qmN on line 3 Notice: Undefined index: a in /in/e8qmN on line 4 Notice: Undefined index: a in /in/e8qmN on line 5 a is null Notice: Undefined variable: argv in /in/e8qmN on line 11 beware