3v4l.org

run code in 500+ PHP versions simultaneously
<?php register_shutdown_function( function() { $error = error_get_last(); var_dump( $error ); } ); class A { public function test( $a, $b ) { } } class B extends A { public function test( $a, $b, $c ) { } } $b = new B();
Output for 8.0.1 - 8.0.20, 8.1.0 - 8.1.7, 8.3.5
Fatal error: Declaration of B::test($a, $b, $c) must be compatible with A::test($a, $b) in /in/1C17B on line 16
Process exited with code 255.
Output for 7.4.0 - 7.4.30
Warning: Declaration of B::test($a, $b, $c) should be compatible with A::test($a, $b) in /in/1C17B on line 16 array(4) { ["type"]=> int(2) ["message"]=> string(76) "Declaration of B::test($a, $b, $c) should be compatible with A::test($a, $b)" ["file"]=> string(9) "/in/1C17B" ["line"]=> int(16) }

preferences:
59.67 ms | 734 KiB | 3 Q