3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $foo = (function() { return function($a) { return $a + 42; }; })(); echo $foo(10) . PHP_EOL; echo $foo(5);
based on BMqQZ
Output for 7.0.0 - 7.2.0
52 47
Output for 5.4.0 - 5.6.28
Parse error: syntax error, unexpected '(' in /in/EdHkF on line 6
Process exited with code 255.