nerdexam
Zend

200-530 · Question #502

What will be the output of the following code? <?php Zend 200-530 Exam $s = '13149'; $s[$s[1]] = $s[1]+$s[3]; print_r($s); ?>

The correct answer is D. 13179. See the full explanation below for the reasoning.

Question

What will be the output of the following code? <?php Zend 200-530 Exam $s = '13149'; $s[$s[1]] = $s[1]+$s[3]; print_r($s); ?>

Options

  • A0
  • B13149
  • CThe script will throw an error message.
  • D13179

How the community answered

(23 responses)
  • A
    13% (3)
  • B
    4% (1)
  • C
    4% (1)
  • D
    78% (18)

Community Discussion

No community discussion yet for this question.

Full 200-530 Practice