3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Example { public function match(callable $cb) { echo $cb(); } } class Callee { public function yo() { return "If I show up, I'm allowed to do this!"; } } $ex = new Example(); $ex->match(['Callee', 'yo']);
based on V3RqK
Output for 7.0.0 - 7.2.0
Deprecated: Non-static method Callee::yo() should not be called statically in /in/JJ8kR on line 5 Deprecated: Non-static method Callee::yo() should not be called statically in /in/JJ8kR on line 7 If I show up, I'm allowed to do this!
Output for 5.4.0 - 5.6.28
Strict Standards: Non-static method Callee::yo() should not be called statically in /in/JJ8kR on line 5 Strict Standards: Non-static method Callee::yo() should not be called statically in /in/JJ8kR on line 7 If I show up, I'm allowed to do this!
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected '[', expecting ')' in /in/JJ8kR on line 20
Process exited with code 255.