Examveda
Examveda

Which one of the following function should I use to find the parent class of a class?

A. get_parent_class()

B. parent_class()

C. class_parent()

D. get_class_parent()

Answer: Option A

Solution(By Examveda Team)

The class functions also allow us to chart inheritance relationships.This function requires either an object or a class name, and it returns the name of the superclass, if any. If no such class exists, that is, if the class we are testing does not have a parent, then the function returns false.

This Question Belongs to PHP >> Object Oriented Concept

Join The Discussion

Related Questions on Object Oriented Concept