3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { // PHP overloading public function __call($name, $arguments) { call_user_func_array(array($this, "_{$name}"), $arguments); } public static function __callStatic($name, $arguments) { call_user_func_array(get_class() . "::_static_{$name}", $arguments); } // The real function private function _test() { print "in _test();\n"; } private static function _test() { print "in _static_test();\n"; } } $a = new A; $a->test(); A::test();
Output for 5.3.0 - 5.4.18
Fatal error: Cannot redeclare A::_test() in /in/jMAa5 on line 24
Process exited with code 255.