September 2001
Intermediate to advanced
768 pages
32h 45m
English
string get_parent_class(object obj) Finds the parent class of an object.
Returns:
Name of the parent class; FALSE if obj is not an object
Description:
get_parent_class() returns the name of the parent class of an object. In other words, if the specified object is an instance of a class that extends another class, get_parent_class() returns the name of the class that’s being extended.
If obj is not an object, the function returns FALSE.
Availability:
UNIX, Windows
Version:
4.0b2+
See also:
is_subclass_of()
Example:
class vehicle { var $passenger_num; var $power_source; var $travel_medium; } class jinrikisha extends vehicle { var $wheels = 2; function jinrikisha () { $this->passenger_num ... |
Read now
Unlock full access