abstract_inheritance_003.phpt 299 B

123456789101112
  1. --TEST--
  2. Allow abstract function override
  3. --FILE--
  4. <?php
  5. abstract class A { abstract function bar($x, $y = 0); }
  6. abstract class B extends A { abstract function bar($x); }
  7. echo "DONE";
  8. ?>
  9. --EXPECTF--
  10. Fatal error: Declaration of B::bar($x) must be compatible with A::bar($x, $y = 0) in %s