3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function run(): mixed {} } class B extends A { public function run(): void { exit; } }
Output for 8.2.0 - 8.2.29, 8.3.0 - 8.3.25, 8.4.1 - 8.4.12
Fatal error: Declaration of B::run(): void must be compatible with A::run(): mixed in /in/fWSJJ on line 12
Process exited with code 255.

preferences:
164.53 ms | 1011 KiB | 7 Q