3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo { public function run() { return call_user_func(array('Bar', 'getValue')); } private function getValue() { return 'Foo'; } } class Bar extends Foo { public static function getValue() { return 'Bar'; } } $x = new Bar; echo $x->run();
Output for 5.3.0 - 5.4.10
Fatal error: Cannot make non static method Foo::getValue() static in class Bar in /in/k3DJM on line 21
Process exited with code 255.