3v4l.org

run code in 200+ php & hhvm versions
<?php function provideGlobals() { printf("Is foo exists: %d\n", array_key_exists("foo", $GLOBALS)); $GLOBALS += array("foo" => "foo"); } provideGlobals(); echo $foo;
Output for 4.3.0 - 5.6.28, 7.0.5 - 7.2.6
Is foo exists: 0 foo
Output for 7.0.0 - 7.0.4
Is foo exists: 1 Notice: Undefined variable: foo in /in/teWDV on line 9