Function for Checking Class Inheritance in OOP in PHP
Make a class ChildClass inheriting
from ParentClass, which in turn
inherits from GrandParentClass.
Using the is_subclass_of function, check
if the class ChildClass is a descendant
of GrandParentClass.
Using the is_subclass_of function, check
if the class ParentClass is a descendant
of GrandParentClass.
Using the is_subclass_of function, check
if the class ChildClass is a descendant
of ParentClass.