3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x = (new ReflectionFunction("substr"))->getClosure(); $x->call(new stdClass);
based on 859mk
Output for 7.0.0 - 7.2.0
Warning: Cannot bind closure to scope of internal class stdClass in /in/YRXne on line 4
Output for 5.4.2 - 5.6.28
Fatal error: Call to undefined method Closure::call() in /in/YRXne 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/YRXne on line 3
Process exited with code 255.