1.

You use the get_class_methods() function to return the names of all the methods in the class. Which function will you use to print it on the screen?(a) printf()(b) print_ar(c) print_r(d) echoI had been asked this question in an international level competition.This interesting question is from Object Tools in chapter Object Tools and Design and Variables in PHP of PHP

Answer» RIGHT answer is (c) print_r

The EXPLANATION is: The function get_class_methods returns an ARRAY THEREFORE we cannot use echo.


Discussion

No Comment Found

Related InterviewSolutions