bug71428.3.phpt 364 B

12345678910
  1. --TEST--
  2. bug #71428: Validation type inheritance with = NULL
  3. --FILE--
  4. <?php
  5. class A { }
  6. class B { public function m(A $a = NULL, $n) { echo "B.m";} };
  7. class C extends B { public function m(A $a , $n) { echo "C.m";} };
  8. ?>
  9. --EXPECTF--
  10. Fatal error: Declaration of C::m(A $a, $n) must be compatible with B::m(?A $a, $n) in %sbug71428.3.php on line 4