3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Example { public function anExample() { } } var_dump(is_callable(['Example', 'anExample'])); function test(callable $callable) { var_dump(is_callable($callable)); } test(['Example', 'anExample']);
based on hdiTb
Output for 7.0.0 - 7.2.0
bool(true) Deprecated: Non-static method Example::anExample() should not be called statically in /in/kuJMS on line 13 bool(true)
Output for 5.4.1 - 5.6.28
bool(true) Strict Standards: Non-static method Example::anExample() should not be called statically in /in/kuJMS on line 13 bool(true)
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected '[', expecting ')' in /in/kuJMS on line 11
Process exited with code 255.