nerdexam
Zend

200-710 · Question #89

Consider the following code snippet: { $value = $value + 1; } $value = $value + 2; { $array = array (1, 2, 3); modifyArray($array);

The correct answer is B. 2, 3, 6. See the full explanation below for the reasoning.

Arrays

Question

Consider the following code snippet: { $value = $value + 1; } $value = $value + 2; { $array = array (1, 2, 3); modifyArray($array);

Options

  • A2, 3, 4
  • B2, 3, 6
  • C4, 5, 6
  • D1, 2, 3

How the community answered

(70 responses)
  • A
    4% (3)
  • B
    71% (50)
  • C
    7% (5)
  • D
    17% (12)

Topics

#arrays#pass by reference#function scope#array modification

Community Discussion

No community discussion yet for this question.

Full 200-710 Practice