ExamVeda
Login
Home
This question belongs to PHP Object Oriented Concept
Object Oriented Concept
?

What will be the output if a protected method is given as argument to the function method_exist()?

Answer & Solution
Correct Answer: Option D
method_exists() returns true for private and protected methods as well as for public ones. Remember that the fact that a method exists does not mean that it will be callable.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.