请定义什么是stdClass
。
stdClass
is just a generic 'empty' class that's used when casting other types to objects.
(stdClass
只是将其他类型强制转换为对象时使用的通用“空”类。)
stdClass
is not the base class for objects in PHP. (尽管有其他两个答案, stdClass
并不是 PHP中对象的基类。)
(这可以很容易地证明:)
class Foo{}
$foo = new Foo();
echo ($foo instanceof stdClass)?'Y':'N';
// outputs 'N'
I don't believe there's a concept of a base object in PHP
(我不相信PHP中有基础对象的概念)