There are a few pitfalls to be aware of. Before PHP version 5.1.0,
instanceof would call __autoload()
if the class name did not exist. In addition, if the class was not loaded,
a fatal error would occur. This can be worked around by using a dynamic
class reference, or a string variable containing the class name:

The instanceof operator was introduced in PHP 5.
Before this time is_a() was used but
is_a() has since been deprecated in favor of
instanceof. Note that as of PHP 5.3.0,
is_a() is no longer deprecated.