MCQs > IT & Programming > PHP > What would be the output of the I and II sample codes: I) $a = array(); $b = $a; $b['foo'] = 42; echo $a['foo']; II) $a = new StdClass(); $b = $a; $b->foo = 42; echo $a->foo;

PHP MCQs

What would be the output of the I and II sample codes: I) $a = array(); $b = $a; $b['foo'] = 42; echo $a['foo']; II) $a = new StdClass(); $b = $a; $b->foo = 42; echo $a->foo; 

Answer

Correct Answer: NULL,42

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