MCQs > IT & Programming > PHP > 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 lines should be commented to print the class name without errors?

PHP 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 lines 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 Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

PHP Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it