3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $m = 1; //$foo = &$GLOBALS; $GLOBALS = array(); $GLOBALS["m"] = 2; var_dump($m); $m++; var_dump($foo);
Output for 5.0.4 - 5.6.28, 7.0.0 - 7.1.0
int(1) Notice: Undefined variable: foo in /in/nqtpq on line 9 NULL
Output for hhvm-3.10.0 - 3.12.0
int(2) Notice: Undefined variable: foo in /in/nqtpq on line 9 NULL
Output for 4.3.0 - 5.0.3
int(1) Notice: Undefined variable: foo in /in/nqtpq on line 9 NULL