MCQs > IT & Programming > PHP > What will the output?:- moreTesting(); ?>

PHP MCQs

What will the output of following code:- <?php class BaseClass { public function test() { echo "BaseClass::test() called\n"; } final public function moreTesting() { echo "BaseClass::moreTesting() called\n"; } } class ChildClass extends BaseClass { public function moreTesting() { echo "ChildClass::moreTesting() called\n"; } } $obj=new ChildClass; $obj->moreTesting(); ?> 

Answer

Correct Answer: Results in Fatal error: Cannot override final method BaseClass::moreTesting()

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