MCQs > IT & Programming > PHP 5 > What this code will do? class Animal { public $name = 'dog'; } $a = new Animal(); $b = clone $a; $c = $a; $a->name = 'cat'; $b->name = 'bear'; $c->name = 'parrot'; echo $a->name . ', ' . $b->name . ', ' . $c->name;

PHP 5 MCQs

What this code will do? class Animal { public $name = 'dog'; } $a = new Animal(); $b = clone $a; $c = $a; $a->name = 'cat'; $b->name = 'bear'; $c->name = 'parrot'; echo $a->name . ', ' . $b->name . ', ' . $c->name;

Answer

Correct Answer: parrot, bear, parrot

Explanation:

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

PHP 5 Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

PHP 5 Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it