3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $fn = static function ($foo) {return $foo;}; //$r = new \ReflectionFunction($fn); $fn1 = @$fn->bindTo(new \stdClass); var_dump($fn1);
based on KPXjA
Output for 7.0.0 - 7.2.0
NULL
Output for 5.4.0 - 5.6.28
object(Closure)#3 (1) { ["parameter"]=> array(1) { ["$foo"]=> string(10) "<required>" } }
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected T_FUNCTION, expecting T_PAAMAYIM_NEKUDOTAYIM in /in/Bjj0s on line 3
Process exited with code 255.