On Mon, 14 Jan 2019 at 14:48, Rowan Collins <rowan.coll...@gmail.com> wrote:
> Currently, it has no methods, and matches no type checks other than itself > and "object"; in a sense, it doesn't even have any properties, just the > ability to add them dynamically. To me, that makes sense: it's the > "classless object", the absolute bare minimum any object could be. > Apologies for the multiple replies, but it just occurred to me that with anonymous classes, we can define something even more minimal: $foo = new class {}; $bar = new stdClass; Given that stdClass is returned as a "default structureless object" by a lot of internal functions, what is the justification for $foo and $bar here behaving differently? Regards, -- Rowan Collins [IMSoP]