xref: /PHP-8.0/Zend/tests/bug73987_2.phpt (revision fe9860c2)
1--TEST--
2Bug #73987 (Method compatibility check looks to original definition and not parent - nullabilty abstract)
3--FILE--
4<?php
5
6abstract class A {
7    abstract function example($a, $b, $c);
8}
9
10class B extends A {
11    function example($a, $b = null, $c = null) { }
12}
13
14class C extends B {
15    function example($a, $b, $c = null) { }
16}
17
18?>
19--EXPECTF--
20Fatal error: Declaration of C::example($a, $b, $c = null) must be compatible with B::example($a, $b = null, $c = null) in %s on line %d
21