MCQs > IT & Programming > PHP 5 > Consider the following class: 1 class Insurance 2 { 3 function clsName() 4 { 5 echo get_class($this); 6 } 7 } 8 $cl = new Insurance(); 9 $cl->clsName(); 10 Insurance::clsName(); Which should be commented to print the class name without errors?

PHP 5 MCQs

Consider the following class:

1 class Insurance
2 {
3 function clsName()
4 {
5 echo get_class($this);
6 }
7 }
8 $cl = new Insurance();
9 $cl->clsName();
10 Insurance::clsName();

Which of the following code line(s) should be commented to print the class name without errors?


Answer

Correct Answer: Line 10

Explanation:

Note: This Question is unanswered, help us to find answer for this one

PHP 5 Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

PHP 5 Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it