3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { public function aa(string $a) { } } class B extends A { private function aa(string $a, string $b = null) { } }
based on 7khDC
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.1.6
Fatal error: Access level to B::aa() must be public (as in class A) in /in/uTIsu on line 13
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: Access level to B::aa() must be public (as in class A) or weaker in /in/uTIsu:9 Stack trace: #0 {main}
Process exited with code 255.