3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function aaa(): mixed{} } class Bar extends Foo { public function aaa(): void{} }
Output for 7.4.0 - 7.4.24, 8.0.0 - 8.0.11
Fatal error: Declaration of Bar::aaa(): void must be compatible with Foo::aaa(): mixed in /in/vNF6M on line 10
Process exited with code 255.
Output for 7.3.0 - 7.3.31
Fatal error: Declaration of Bar::aaa(): void must be compatible with Foo::aaa(): mixed in /in/vNF6M on line 11
Process exited with code 255.

preferences:
196.15 ms | 1395 KiB | 74 Q