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; } var_dump(bin2hex(create_function('$a,$b', 'return $a+$b;'))); $f = create_function('$a,$b', 'return $a+$b;'); var_dump($f(1,2));
Output for 4.3.0 - 7.1.0
string(18) "006c616d6264615f31" int(3)