mirror of
https://github.com/php/php-src.git
synced 2024-12-14 04:16:30 +08:00
ccec609b82
These checks were introduced by 8646d9afce
back when name resolution was working differently.
21 lines
452 B
PHP
21 lines
452 B
PHP
--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: Declaration of ns\Foo::method(ns\stdClass $o) must be compatible with Iface::method(stdClass $o) in %s on line %d
|
|
|