Zend
200-530 · Question #219
Zend 200-530 Exam What will the $array array contain at the end of this script? 1 <?php 2 function modifyArray (&$array) 3 { 4 foreach ($array as &$value) 5 { 6 $value = $value + 1; 7 } 9 $value =…
The correct answer is B. 2, 3, 6. See the full explanation below for the reasoning.
Question
Zend 200-530 Exam What will the $array array contain at the end of this script? 1 <?php 2 function modifyArray (&$array) 3 { 4 foreach ($array as &$value) 5 { 6 $value = $value + 1; 7 } 9 $value = $value + 2; 10 } 12 $array = array (1, 2, 3); 13 modifyArray($array); 14 ?>
Options
- A2, 3, 4
- B2, 3, 6
- C4, 5, 6
- D1, 2, 3
How the community answered
(39 responses)- A3% (1)
- B79% (31)
- C5% (2)
- D13% (5)
Community Discussion
No community discussion yet for this question.