What will be the output of executing the following code? <?php class Foo { private function printName($name) { print_r($name); } } $a = new Foo(); $a->printName('James'); ?>
Correct Answer: Fatal error: Call to private method Foo::printName() from context ...
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More PHP MCQ Questions