3v4l.org

run code in 500+ PHP versions simultaneously
<?php class A { public static function foo(int $bar): void {} } class B extends A { public static function foo(string $bar): void {} }
Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.24, 8.2.0 - 8.2.11, 8.3.5
Fatal error: Declaration of B::foo(string $bar): void must be compatible with A::foo(int $bar): void in /in/ZP47X on line 9
Process exited with code 255.

preferences:
54.12 ms | 776 KiB | 3 Q