3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php abstract class A { abstract protected function test($a, $b); } class B extends A { protected function test($a, $b, $c) { return; } }
based on Y6pUU
Output for 7.0.0 - 7.1.6
Fatal error: Declaration of B::test($a, $b, $c) must be compatible with A::test($a, $b) in /in/HAFNi on line 14
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: Declaration of B::test() must be compatible with that of A::test() in /in/HAFNi:8 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Fatal error: Declaration of B::test() must be compatible with A::test($a, $b) in /in/HAFNi on line 14
Process exited with code 255.