3v4l.org

run code in 500+ PHP versions simultaneously
<?php interface I { function __construct(int $i); } class X implements I { function __construct(int $i) {} } // Fatal error: Declaration of Yy::__construct(string $a) must be // compatible with I::__construct(int $i) class Y extends X { function __construct(string $a) {} } ?>
Output for 8.5.0 - 8.5.7
Fatal error: Declaration of Y::__construct(string $a) must be compatible with I::__construct(int $i) in /in/5qeE1 on line 15 Stack trace: #0 {main}
Process exited with code 255.
Output for 8.1.32 - 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.21
Fatal error: Declaration of Y::__construct(string $a) must be compatible with I::__construct(int $i) in /in/5qeE1 on line 15
Process exited with code 255.

preferences:
39.93 ms | 868 KiB | 4 Q