Difference between instanceof and is_subclass_of( )
<?
class Dog { }
class Poodle extends Dog { }
$poppy = new Poodle( );
print (int)($poppy instanceof Poodle);
print "\n";
print (int)is_subclass_of($poppy, "Poodle");
?>
Related examples in the same category