3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class a { abstract function __construct($a); } class b extends a { function __construct() {} }
Output for 8.5.0 - 8.5.2
Fatal error: Declaration of b::__construct() must be compatible with a::__construct($a) in /in/CMnhH on line 8 Stack trace: #0 {main}
Process exited with code 255.
Output for 8.3.0 - 8.3.30, 8.4.1 - 8.4.17
Fatal error: Declaration of b::__construct() must be compatible with a::__construct($a) in /in/CMnhH on line 8
Process exited with code 255.

preferences:
145.35 ms | 1307 KiB | 6 Q