The Manager and Office classes are as follows:
<?php
class Manager{
function printName() {
echo "Manager";
}
}
class Office{
function getManager() {
return new Manager();
}
}
$ofc = new Office();
???
?>
Which of the following should replace '???' to obtain the value of printName() function?
Correct Answer: $ofc->getManager()->printName();
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More LAMP MCQ Questions