3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump((function() { $a; global $a; $a = function() { return $a; }; })()) ?>
based on XjGmM
Output for 7.0.0 - 7.3.0beta1
NULL
Output for hhvm-3.22.0
Notice: Undefined variable: a in /in/iv5oS on line -1 NULL
Output for hhvm-3.18.5 - 3.21.3
Notice: Undefined variable: a in /in/iv5oS on line 4 NULL
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected '(' in /in/iv5oS on line 10
Process exited with code 255.