is_subclass_of
Checks if the object has this class as one of its parents
&reftitle.description;
boolis_subclass_of
mixedobject
stringclass_name
boolallow_string&true;
Checks if the given object has the class
class_name as one of its parents.
&reftitle.parameters;
object
A class name or an object instance. No error is generated if the class does not exist.
class_name
The class name
allow_string
If this parameter set to false, string class name as object
is not allowed. This also prevents from calling autoloader if the class doesn't exist.
&reftitle.returnvalues;
This function returns &true; if the object object,
belongs to a class which is a subclass of
class_name, &false; otherwise.
&reftitle.changelog;
&Version;
&Description;
5.3.9
Added allow_string parameter
5.3.7
Added support for class_name to work with
interfaces
5.0.3
You may also specify the object parameter as a
string (the name of the class)
&reftitle.examples;
is_subclass_of example
]]>
&example.outputs;
is_subclass_of using interface example
]]>
&example.outputs;
&reftitle.notes;
¬e.uses-autoload;
&reftitle.seealso;
get_class
get_parent_class
is_a
class_parents