Undefined field of derived stdClass shows warning
class TestClass extends stdClass
{
public function __construct() {
}
}
function test() {
$x = new stdClass();
$y = new TestClass();
print $x->test . $y->test;
}
$x->test shows no warning.
$y->test shows a warning
Message shows:
Referenced field is not found in subject class.
Note: Check is not performed on objects of type "stdClass" or derived.
Could someone explain?
this is in phpstorm 3.0
m
请先登录再写评论。
Hi Marc,
Most likely it is a bug (as far as I can see it) -- as it should work just fine because TestClass is a child of stdClass.
Should I submit a bug report?
I think -- Yes