MCQs > IT & Programming > PHP > What's the output sayHello($c);

PHP MCQs

What will be the output of the following code: <?php class A {} class B {} class C extends B {} class D { function sayHello (A $argument) { echo '$argument is an instance of A'; } function sayHello (B $argument) { echo '$argument is an instance of B'; } } $d = new D(); $c = new C(); $d->sayHello($c);

Answer

Correct Answer: PHP Fatal error

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