3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class MyClass { public function doStuff(){ } } function doSomething(callable $param) { var_dump($param); } doSomething(['MyClass', 'doStuff']);
Output for 7.0.0 - 7.2.0
Deprecated: Non-static method MyClass::doStuff() should not be called statically in /in/E0YJ3 on line 8 array(2) { [0]=> string(7) "MyClass" [1]=> string(7) "doStuff" }
Output for 5.4.1 - 5.6.28
Strict Standards: Non-static method MyClass::doStuff() should not be called statically in /in/E0YJ3 on line 8 array(2) { [0]=> string(7) "MyClass" [1]=> string(7) "doStuff" }
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected '[', expecting ')' in /in/E0YJ3 on line 12
Process exited with code 255.