3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface B { } interface A extends B { public function a(A $a); } class AA implements A { public function a(B $a) { // } }
Output for 7.0.0 - 7.2.0
Fatal error: Declaration of AA::a(B $a) must be compatible with A::a(A $a) in /in/q3FIR on line 12
Process exited with code 255.
Output for 5.4.0 - 5.6.28
Fatal error: Declaration of AA::a() must be compatible with A::a(A $a) in /in/q3FIR on line 13
Process exited with code 255.
Output for 5.3.0 - 5.3.29
Fatal error: Declaration of AA::a() must be compatible with that of A::a() in /in/q3FIR on line 13
Process exited with code 255.
Output for 5.0.0 - 5.2.17
Fatal error: Declaration of AA::a() must be compatible with that of A::a() in /in/q3FIR on line 12
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING in /in/q3FIR on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING in /in/q3FIR on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/q3FIR on line 3
Process exited with code 255.