3v4l.org

run code in 500+ PHP versions simultaneously
<?php interface A { public function __construct(); } class B implements A { public function __construct(stdClass $stdClass) { } }
Output for 8.5.0 - 8.5.13, 8.6.0
Fatal error: Declaration of B::__construct(stdClass $stdClass) must be compatible with A::__construct() in /in/WaAqn on line 10 Stack trace: #0 {main}
Process exited with code 255.
Output for 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.36, 8.3.0 - 8.3.37, 8.4.1 - 8.4.28
Fatal error: Declaration of B::__construct(stdClass $stdClass) must be compatible with A::__construct() in /in/WaAqn on line 10
Process exited with code 255.

preferences:
17.68 ms | 1167 KiB | 6 Q