3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php namespace Foo { function __lambda_func() { return print 'no'; } } namespace Bar { function yuno($x) { $x(); } } namespace { function __lambda_func() { return print 'no'; } Bar\yuno(function() { return print 'OK'; }); $fn = create_function("xyz", ""); }
based on mHTfq
Output for 7.2.0
OK Deprecated: Function create_function() is deprecated in /in/e1Ire on line 22 Parse error: syntax error, unexpected ')', expecting variable (T_VARIABLE) in /in/e1Ire(22) : runtime-created function on line 1
Process exited with code 255.
Output for 5.6.8 - 7.1.10
OK Parse error: syntax error, unexpected ')', expecting variable (T_VARIABLE) in /in/e1Ire(22) : runtime-created function on line 1
Process exited with code 255.
Output for 5.4.9 - 5.5.35
OK Parse error: syntax error, unexpected ')', expecting '&' or variable (T_VARIABLE) in /in/e1Ire(22) : runtime-created function on line 1
Process exited with code 255.
Output for 5.3.19 - 5.3.29
OK Parse error: syntax error, unexpected ')', expecting '&' or T_VARIABLE in /in/e1Ire(22) : runtime-created function on line 1
Process exited with code 255.