3v4l.org

run code in 300+ 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
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:
187.18 ms | 1406 KiB | 73 Q