1.

Which one of the following will you use to check the class of an object?(a) class()(b) _class()(c) class_check()(d) get_class()I had been asked this question in a job interview.I'm obligated to ask this question of Object Tools in portion Object Tools and Design and Variables in PHP of PHP

Answer»

The correct option is (d) get_class()

EASIEST explanation: This function ACCEPTS any OBJECT as an argument and returns its CLASS name as a string.



Discussion

No Comment Found

Related InterviewSolutions