summaryrefslogtreecommitdiff
path: root/Zend/tests/bug73987_3.phpt
blob: 89e4686ed6f579eb556307376cee3955c4ec3fa9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--TEST--
Bug #73987 (Method compatibility check looks to original definition and not parent - return types abstract)
--FILE--
<?php

abstract class A {
    abstract function example();
}

class B extends A {
    function example(): int  { }
}

class C extends B {
    function example(): string { }
}

?>
--EXPECTF--
Fatal error: Declaration of C::example(): string must be compatible with B::example(): int in %s