bug62441.phpt 447 B

12345678910111213141516171819
  1. --TEST--
  2. Bug #62441: Incorrect strong typing in namespaced child classes
  3. --FILE--
  4. <?php
  5. namespace {
  6. interface Iface {
  7. function method(stdClass $o);
  8. }
  9. }
  10. namespace ns {
  11. class Foo implements \Iface {
  12. function method(stdClass $o) { }
  13. }
  14. (new Foo)->method(new \stdClass);
  15. }
  16. ?>
  17. --EXPECTF--
  18. Fatal error: Declaration of ns\Foo::method(ns\stdClass $o) must be compatible with Iface::method(stdClass $o) in %s on line %d