interface I
{
function foo(stdClass $arg);
}
class Test extends stdClass
{
}
class Implementation implements I
{
function foo(Test $arg)
{
}
}
Result:
Fatal error: Declaration of InterfaceImplementation::foo() must be compatible with I::foo(stdClass $arg) in test.php on line XY
How come that I can't type hint a subtype in the implementation?