3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Controller { public function testAction() { } public static function staticAction() { } public function __call($method, $arguments) { } } $calls = array( array('Controller', 'testAction'), array('Controller', 'staticAction'), array('Controller', 'fooAction'), array(new Controller, 'testAction'), array(new Controller, 'staticAction'), array(new Controller, 'fooAction'), ); foreach($calls as $call) { var_dump(is_callable($call)); var_dump(is_callable($call) || method_exists($call[0], '__call')); }

preferences:
39.73 ms | 402 KiB | 5 Q