MCQs > IT & Programming > PHP > Which result will produce this code? class A { private $property = 1; public function getProperty() { return $this->property; } } class B extends A { protected $property = 2; public function __construct($v) { $this->property = $v; } } class C extends B { public $property = 3; } $c = new C(4); echo $c->property; echo $c->getProperty();

PHP MCQs

Which result will produce this code? class A { private $property = 1; public function getProperty() { return $this->property; } } class B extends A { protected $property = 2; public function __construct($v) { $this->property = $v; } } class C extends B { public $property = 3; } $c = new C(4); echo $c->property; echo $c->getProperty();

Answer

Correct Answer: 41

Explanation:

Note: This Question is unanswered, help us to find answer for this one

PHP Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

PHP Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it