xref: /PHP-7.2/Zend/tests/bug73987_3.phpt (revision 648238da)
1--TEST--
2Bug #73987 (Method compatibility check looks to original definition and not parent - return types abstract)
3--FILE--
4<?php
5
6abstract class A {
7    abstract function example();
8}
9
10class B extends A {
11    function example(): int  { }
12}
13
14class C extends B {
15    function example(): string { }
16}
17
18?>
19--EXPECTF--
20Fatal error: Declaration of C::example(): string must be compatible with B::example(): int in %s
21