MCQs > IT & Programming > PHP > What is the output? class Foo { private $foo; protected $bar; public $test; public function __construct() { $this->foo = 1; $this->bar = 2; $this->test = 3; } } print_r( (array) new Foo );

PHP MCQs

What is the output of the following code? class Foo { private $foo; protected $bar; public $test; public function __construct() { $this->foo = 1; $this->bar = 2; $this->test = 3; } } print_r( (array) new Foo );

Answer

Correct Answer: Array ( [Foofoo] => 1 [*bar] => 2 [test] => 3 )

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