MCQs>IT & Programming>PHP>What does this display: Class Obj{ public $a = 2; public function __construct($var=null){ if(!empty($var)) $this->a = $var } } $obj = new Obj(0); echo $obj->a;
PHP MCQs
What does this display: Class Obj{ public $a = 2; public function __construct($var=null){ if(!empty($var)) $this->a = $var } } $obj = new Obj(0); echo $obj->a;
Answer
Correct Answer: 2
Explanation:
Note: This Question is unanswered, help us to find answer for this one