3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class a {} $x = (new ReflectionFunction("substr"))->getClosure(); $x->call(new a); ?>
based on KVmtI
Output for 7.0.0 - 7.2.0
Warning: Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure() in /in/NiL0v on line 4
Output for 5.4.2 - 5.6.28
Fatal error: Call to undefined method Closure::call() in /in/NiL0v on line 4
Process exited with code 255.
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/NiL0v on line 3
Process exited with code 255.