bug63336.phpt 771 B

12345678910111213141516171819202122
  1. --TEST--
  2. Bug #63336 (invalid E_NOTICE error occur)
  3. --FILE--
  4. <?php
  5. error_reporting(E_ALL | E_NOTICE );
  6. define("TEST", "123");
  7. class Base {
  8. const DUMMY = "XXX";
  9. public function foo($var=TEST, $more=null) { return true; }
  10. public function bar($more=self::DUMMY) { return true; }
  11. }
  12. class Child extends Base {
  13. const DUMMY = "DDD";
  14. public function foo($var=TEST, array $more = array()) { return true; }
  15. public function bar($var, $more=self::DUMMY) { return true; }
  16. }
  17. ?>
  18. --EXPECTF--
  19. Strict Standards: Declaration of Child::foo() should be compatible with Base::foo($var = TEST, $more = NULL) in %sbug63336.php on line %d
  20. Strict Standards: Declaration of Child::bar() should be compatible with Base::bar($more = self::DUMMY) in %sbug63336.php on line %d