blob: 3299f4967dbdae310b30683a5e3261c4f15c973f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
--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
|