3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php abstract class Foo { abstract public function fooFunc(); } class Bar extends Foo { private function fooFunc() { return 'hello'; } } $callable = array(new Bar, 'fooFunc'); var_dump(is_callable($callable)); var_dump(call_user_func($callable));
Output for 5.3.0 - 5.4.27
Fatal error: Access level to Bar::fooFunc() must be public (as in class Foo) in /in/F3WsA on line 13
Process exited with code 255.