summaryrefslogtreecommitdiff
path: root/Zend/tests/bug73987.phpt
blob: 610b594a6442440f12b28b5dac8c88fbac1d0643 (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 - nullability interface)
--FILE--
<?php

interface I {
  public function example($a, $b, $c);
}
class A implements I {
  public function example($a, $b = null, $c = null) { } // compatible with I::example
}
class B extends A {
  public function example($a, $b, $c = null) { } // compatible with I::example
}

?>
--EXPECTF--
Fatal error: Declaration of B::example($a, $b, $c = NULL) must be compatible with A::example($a, $b = NULL, $c = NULL) in %s