What will be the output of the following PHP code
class 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
Answers
Answered by
0
______✨ HEY MATE ✨______
➡️Option (C) BOB ( age 44 ) is the right answer ✔️
➡️Option (C) BOB ( age 44 ) is the right answer ✔️
Answered by
0
Hii dear here is your answer
Option c is the correct answer
Option c is the correct answer
Similar questions
Math,
7 months ago
Math,
7 months ago
Math,
7 months ago
Computer Science,
1 year ago
Computer Science,
1 year ago
English,
1 year ago