get_class
Returns the name of the class of an object
&reftitle.description;
stringget_class
objectobject&null;
Gets the name of the class of the given object.
&reftitle.parameters;
object
The tested object. This parameter may be omitted when inside a class.
&reftitle.returnvalues;
Returns the name of the class of which object is an
instance. Returns &false; if object is not an
object.
If object is omitted when inside a class, the
name of that class is returned.
&reftitle.errors;
If get_class is called with anything other than an
object, an E_WARNING level error is raised.
&reftitle.changelog;
&Version;
&Description;
Since 5.3.0
&null; became the default value for object,
so passing &null; to object now has the same
result as not passing any value.
Since 5.0.0
The class name is returned in its original notation.
Since 5.0.0
The object parameter is optional if called
from the object's method.
&reftitle.examples;
Using get_class
name();
?>
]]>
&example.outputs;
Using get_class in superclass
]]>
&example.outputs;
&reftitle.seealso;
get_called_class
get_parent_class
gettype
is_subclass_of