bug62441.phpt 494 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: Could not check compatibility between ns\Foo::method(ns\stdClass $o) and Iface::method(stdClass $o), because class ns\stdClass is not available in %s on line %d