blob: 6a0a157f29a150339e87de7f248bc787af3418cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
--TEST--
Bug #73987 (Method compatibility check looks to original definition and not parent)
--FILE--
<?php
interface I {
public function example();
}
class A implements I {
public function example(): int { } // compatible with I::example
}
class B extends A {
public function example(): string { } // compatible with I::example
}
?>
--EXPECTF--
Fatal error: Declaration of B::example(): string must be compatible with A::example(): int in %s
|