MCQs > IT & Programming > LAMP > Refer to the small php script given below: The getSal() of emp has to behave exactly as getSal() of person. Which lines of code would you use to replace the '???'

LAMP MCQs

Refer to the small php script given below:

<?php

class person{

  function getSal()

  {

         . . .

         . . .

  }

}

class emp extends person{

  function getSal()

  {

           ???

  }

}

?>

The getSal() of emp has to behave exactly as getSal() of person. Which of the following lines of code would you use to replace the '???'

Answer

Correct Answer: parent::getSal();

Explanation:

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

LAMP Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

LAMP Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it