xref: /PHP-7.4/Zend/tests/bug62441.phpt (revision 49a3b03e)
1--TEST--
2Bug #62441: Incorrect strong typing in namespaced child classes
3--FILE--
4<?php
5namespace {
6    interface Iface {
7        function method(stdClass $o);
8    }
9}
10namespace ns {
11    class Foo implements \Iface {
12        function method(stdClass $o) { }
13    }
14
15    (new Foo)->method(new \stdClass);
16}
17?>
18--EXPECTF--
19Fatal 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
20