summaryrefslogtreecommitdiff
path: root/Zend/tests/bug73987_2.phpt
blob: f6861fa4da8ad7b3caa4275068b7cdb93f973912 (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 - nullabilty abstract)
--FILE--
<?php

abstract class A {
    abstract function example($a, $b, $c);
}

class B extends A {
    function example($a, $b = null, $c = null) { }
}

class C extends B {
    function example($a, $b, $c = null) { }
}

?>
--EXPECTF--
Fatal 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