3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php abstract class Foo { public function abc() { } } class Bar extends Foo { protected function abc() { } }
based on 7fZvY
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.1.6
Fatal error: Access level to Bar::abc() must be public (as in class Foo) in /in/a1lN4 on line 19
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: Access level to Bar::abc() must be public (as in class Foo) or weaker in /in/a1lN4:13 Stack trace: #0 {main}
Process exited with code 255.