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