What will be the output of the following code?
class Person
{
protected $name;
public function __construct($name) {
$this->name = $name;
}
public function getName() {
return $this->name;
}
}
$person = new Person("Foo");
echo $person->getName();
Correct Answer: Foo
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More PHP MCQ Questions