3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function foo($x) { var_dump($x); return $x('gehr') === 'true'; } $v = foo(function($p){return 'true';}); var_dump($v);
based on hOP54
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.3.0beta1
object(Closure)#1 (1) { ["parameter"]=> array(1) { ["$p"]=> string(10) "<required>" } } bool(true)
Output for hhvm-3.21.3 - 3.22.0
object(Closure$;4)#1 (1) { ["parameter"]=> array(1) { ["$p"]=> string(10) "<required>" } } bool(true)
Output for hhvm-3.18.5
object(Closure$;2)#1 (1) { ["parameter"]=> array(1) { ["$p"]=> string(10) "<required>" } } bool(true)