MCQs > IT & Programming > PHP 5 > class B { public $b; } function process_a($a) { $a['b'] = 42; } function process_b($b) { $b->b = 42; } $v1 = array('b' => 2); process_a($v1); $v2 = new B(); $v2->b = 2; process_b($v2); What are the values of $v1['b'] and $v2->b?

PHP 5 MCQs

class B { public $b; } function process_a($a) { $a['b'] = 42; } function process_b($b) { $b->b = 42; } $v1 = array('b' => 2); process_a($v1); $v2 = new B(); $v2->b = 2; process_b($v2); What are the values of $v1['b'] and $v2->b?

Answer

Correct Answer: 2, 42

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