MCQOPTIONS
Saved Bookmarks
| 1. |
_What will be the output of the following PHP codeclass Person { function getName() { return "Bob"; } function getAge() { return 44; } function __toString() { $desc = $this->getName(); $desc .= " (age ".$this->getAge().")"; return $desc; }}$person = new Person();print $person;$? |
| A. | Object Not Found |
| B. | PHP Catchable fatal error |
| C. | BOB (age 44) |
| D. | BOB |
| Answer» D. BOB | |