1.

Which one of the following functions is used to determine object type?(a) obj_type()(b) type()(c) is_a()(d) is_obj()The question was posed to me by my college director while I was bunking the class.I want to ask this question from Basics of Object-Oriented PHP- 2 topic in division Object-Oriented PHP of PHP

Answer»

The correct OPTION is (c) is_a()

EASY explanation: The is_a() function returns true if object belongs to a class TYPE or if it belongs to a class that is a child of that class. Or else false is RETURNED.



Discussion

No Comment Found

Related InterviewSolutions