instanceof Object¶
object is a type, but it can also be used as a constant name. Then, instanceof accepts it for testing a variable.
There are some other cases around instanceof, which are surprising upon first read.
It is possible to use a string or an object in a variable, but not a direct string, a constant nor a ::class.