3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class cls {} $c = (new ReflectionMethod('SplStack', 'count'))->getClosure(); $c = $c->bindTo(new cls); $c();
Output for 7.0.0 - 7.2.0
Warning: ReflectionMethod::getClosure() expects exactly 1 parameter, 0 given in /in/OCkA3 on line 4 Fatal error: Uncaught Error: Call to a member function bindTo() on null in /in/OCkA3:5 Stack trace: #0 {main} thrown in /in/OCkA3 on line 5
Process exited with code 255.
Output for 5.6.8 - 5.6.21
Warning: ReflectionMethod::getClosure() expects exactly 1 parameter, 0 given in /in/OCkA3 on line 4 Fatal error: Call to a member function bindTo() on null in /in/OCkA3 on line 5
Process exited with code 255.
Output for 5.4.1 - 5.5.35
Warning: ReflectionMethod::getClosure() expects exactly 1 parameter, 0 given in /in/OCkA3 on line 4 Fatal error: Call to a member function bindTo() on a non-object in /in/OCkA3 on line 5
Process exited with code 255.
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/OCkA3 on line 4
Process exited with code 255.