Function for Checking Class Inheritance in OOP in PHP
is_subclass_ofЗадание 1
Make a class ChildClass inheriting
from ParentClass, which in turn
inherits from GrandParentClass.
Задание 2
Using the is_subclass_of function, check
if the class ChildClass is a descendant
of GrandParentClass.
Задание 3
Using the is_subclass_of function, check
if the class ParentClass is a descendant
of GrandParentClass.
Задание 4
Using the is_subclass_of function, check
if the class ChildClass is a descendant
of ParentClass.