stdClass
is just a generic 'empty' class that's used when casting other types to objects. Despite what the other two answers say, stdClass
is not the base class for objects in PHP. This can be demonstrated fairly easily:
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
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…