php8.5
Home/ Manual/ reflection / reflectionclass/ ReflectionClass::getParentClass

ReflectionClass::getParentClass

PHP function Edit on GitHub ✎

(PHP 5, PHP 7, PHP 8)

Gets parent class

Description

ReflectionClass::getParentClass(): ReflectionClass|false

Get the parent class.

Parameters Parameters

Return Values

A ReflectionClass or false if there's no parent.

See Also

  • ReflectionClass::__construct

Source: reference/reflection/reflectionclass/getparentclass.xml · from the official PHP manual (php/doc-en)