3v4l.org

run code in 500+ PHP versions simultaneously
<?php class A { } class B extends A { } interface AI { public function test(A $a); } class Run implements AI { public function test(B $b) { return; } }
Output for 8.5.0 - 8.5.8
Fatal error: Declaration of Run::test(B $b) must be compatible with AI::test(A $a) in /in/nHa6i on line 14 Stack trace: #0 {main}
Process exited with code 255.
Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.31, 8.3.0 - 8.3.32, 8.4.1 - 8.4.23
Fatal error: Declaration of Run::test(B $b) must be compatible with AI::test(A $a) in /in/nHa6i on line 14
Process exited with code 255.

preferences:
75.6 ms | 1162 KiB | 4 Q