3v4l.org

run code in 300+ PHP versions simultaneously
<?php class bar { public function test($method) { return is_callable(array($this, $method)); } private function foo() {} } $bar = new bar; var_dump($bar->test('wibble')); var_dump($bar->test('foo'));

preferences:
38.91 ms | 402 KiB | 5 Q