- 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.
<?php
class A {
public static function foo(int $bar): void {}
}
class B extends A {
public static function foo(string $bar): void {}
}