objects_008.phpt 374 B

1234567891011121314151617181920
  1. --TEST--
  2. method overloading with different method signature
  3. --FILE--
  4. <?php
  5. class test {
  6. function foo(Test $arg) {}
  7. }
  8. class test2 extends test {
  9. function foo(Test $arg) {}
  10. }
  11. class test3 extends test {
  12. function foo(Test3 $arg) {}
  13. }
  14. ?>
  15. --EXPECTF--
  16. Fatal error: Declaration of test3::foo(Test3 $arg) must be compatible with test::foo(Test $arg) in %s on line %d