3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Base { protected function func() { echo 1; } public function test() { $this->func(); } } class Child extends Base { private function func() { echo 2; } } $c = new Child(); $c->test();
Output for 5.3.0 - 5.4.18
Fatal error: Access level to Child::func() must be protected (as in class Base) or weaker in /in/nqJps on line 23
Process exited with code 255.