3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $fn = create_function( '$x', 'return $x; } $foo = 42; function foo($int) { return $int; ' ); echo foo($fn($foo));
Output for 7.2.0
Deprecated: Function create_function() is deprecated in /in/jU3UU on line 4 42
Output for 4.3.0 - 5.6.30, 7.0.0 - 7.1.10
42
Output for hhvm-3.22.0
Notice: Undefined variable: foo in /in/jU3UU on line -1
Output for hhvm-3.10.1 - 3.21.3
Notice: Undefined variable: foo in /in/jU3UU on line 7