objects_005.phpt 369 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() {}
  9. }
  10. class test2 extends test {
  11. function &foo() {}
  12. }
  13. class test3 extends test {
  14. function foo() {}
  15. }
  16. echo "Done\n";
  17. ?>
  18. --EXPECTF--
  19. Warning: Declaration of test3::foo() should be compatible with & test::foo() in %s on line %d
  20. Done