3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class cls {} $c = (new ReflectionMethod('SplStack', 'count'))->getClosure(new SplStack); $c = $c->bindTo(new cls); $c();
based on OCkA3
Output for 7.1.0 - 7.2.0
Warning: Cannot bind method SplDoublyLinkedList::count() to object of class cls in /in/tpK16 on line 5 Fatal error: Uncaught Error: Function name must be a string in /in/tpK16:6 Stack trace: #0 {main} thrown in /in/tpK16 on line 6
Process exited with code 255.
Output for 7.0.0 - 7.0.20
Warning: Cannot bind internal method SplDoublyLinkedList::count() to object of class cls in /in/tpK16 on line 5 Fatal error: Uncaught Error: Function name must be a string in /in/tpK16:6 Stack trace: #0 {main} thrown in /in/tpK16 on line 6
Process exited with code 255.
Output for 5.6.15 - 5.6.28
Warning: Cannot bind internal method SplDoublyLinkedList::count() to object of class cls in /in/tpK16 on line 5 Fatal error: Function name must be a string in /in/tpK16 on line 6
Process exited with code 255.
Output for 5.4.1 - 5.6.14
Warning: Cannot bind function SplDoublyLinkedList::count to object of class cls in /in/tpK16 on line 5
Process exited with code 139.
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/tpK16 on line 4
Process exited with code 255.