bug73987.phpt 552 B

123456789101112131415161718
  1. --TEST--
  2. Bug #73987 (Method compatibility check looks to original definition and not parent - nullability interface)
  3. --FILE--
  4. <?php
  5. interface I {
  6. public function example($a, $b, $c);
  7. }
  8. class A implements I {
  9. public function example($a, $b = null, $c = null) { } // compatible with I::example
  10. }
  11. class B extends A {
  12. public function example($a, $b, $c = null) { } // compatible with I::example
  13. }
  14. ?>
  15. --EXPECTF--
  16. Fatal error: Declaration of B::example($a, $b, $c = null) must be compatible with A::example($a, $b = null, $c = null) in %s on line %d