objects_007.phpt 446 B

123456789101112131415161718192021222324
  1. --TEST--
  2. method overloading with different method signature
  3. --INI--
  4. error_reporting=8191
  5. --FILE--
  6. <?php
  7. class test {
  8. function foo($arg, &$arg2 = NULL) {}
  9. }
  10. class test2 extends test {
  11. function foo($arg, &$arg2 = NULL) {}
  12. }
  13. class test3 extends test {
  14. function foo($arg, &$arg2) {}
  15. }
  16. echo "Done\n";
  17. ?>
  18. --EXPECTF--
  19. Warning: Declaration of test3::foo($arg, &$arg2) should be compatible with test::foo($arg, &$arg2 = NULL) in %s on line %d
  20. Done