⊗ppOpFnCOB 61 of 107 menu

Function for Checking Object Class Membership in OOP in PHP

is_a

Make a ChildClass class that inherits from ParentClass. Create an object of the ChildClass class, assign it to the variable $obj.

Using the is_a function, check if the object $obj belongs to the ChildClass class.

Using the is_a function, check if the object $obj belongs to the ParentClass class.

byenru