instanceof is smart
var_dump($a instanceof stdClass);
var_dump("foo" instanceof stdClass);
PHP Fatal error: instanceof expects an object instance, constant given in Command line code on line 1
If instanceof expects an object instance why does it accept a string variable? Well, I think that's actually good because why error if not necessary. On the other hand, if it accepts a string variable why does it fatal on a string constant? WTF.