summaryrefslogtreecommitdiff
path: root/Zend/tests/bug62441.phpt
blob: 2b9f35cb30f0e90d7e9cc8974543b6b68b83b7bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--TEST--
Bug #62441: Incorrect strong typing in namespaced child classes
--FILE--
<?php
namespace {
    interface Iface {
        function method(stdClass $o);
    }
}
namespace ns {
    class Foo implements \Iface {
        function method(stdClass $o) { }
    }

    (new Foo)->method(new \stdClass);
}
?>
--EXPECTF--
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