<?php
interface I {
const C = 12;
public static function test(array $a);
}
abstract class A {
const A = 14;
protected static $var = 17;
public static function test(array $a, $b){
return static::C;
}
}
class B extends A implements I {
const A = 15;
}
var_dump(B::test(array(), ''));
Fatal error: Declaration of A::test(array $a, $b) must be compatible with I::test(array $a) in /in/EHiIY on line 10
Process exited with code 255.
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Fatal error: Declaration of A::test(array $a, $b) must be compatible with I::test(array $a) in /in/EHiIY on line 10
Process exited with code 255.