3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function create_function2($args, $content) { static $counter = 0; $funcname = '_lambda_' . (++$counter); eval("function {$funcname} ({$args}) { {$content}; }"); return $funcname; } $f = create_function('$a,$b', 'return $a+$b;'); $f(1,2);
Output for 4.3.0 - 7.1.0