3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php /* class Foo { public static function barStatic() { } public function bar() { } } $foo = new Foo(); var_dump(is_callable(array($foo, 'bar'))); var_dump(is_callable(array($foo, 'barStatic'))); var_dump(is_callable(array('Foo', 'bar'))); var_dump(is_callable(array('Foo', 'barStatic'))); var_dump(is_callable('Foo::bar')); var_dump(is_callable('Foo::barStatic')); */ var_dump(is_callable('ReflectionMethod::setAccessible')); var_dump(is_callable(array('ReflectionMethod', 'setAccessible'))); var_dump(is_callable(array('Exception', 'getMessage')));
Output for 4.3.0 - 4.4.9, 5.3.0 - 7.1.0
bool(false) bool(false) bool(false)
Output for 5.1.2 - 5.2.17
bool(false) bool(false) Strict Standards: Non-static method Exception::getMessage() cannot be called statically in /in/iMObC on line 27 bool(true)
Output for 5.0.0 - 5.1.1
bool(false) bool(false) bool(true)