PHP/Reflection/get parent class — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
Admin (обсуждение | вклад) м (1 версия) |
(нет различий)
|
Текущая версия на 10:07, 26 мая 2010
get_parent_class() function returns the name of the parent class.
<source lang="html4strict">
The syntax is: string get_parent_class(object objname);
<? class Vehicle { } class Car extends Vehicle { } $car = new Car; $parent = get_parent_class($car); print_r($parent); ?>
</source>