nerdexam
National_Instruments

200-500 · Question #112

What will be the output value of the following code? $array = array(1,2,3); while (list(,$v) = each($array)); var_dump(current($array));

The correct answer is A. bool(false). See the full explanation below for the reasoning.

Question

What will be the output value of the following code? $array = array(1,2,3); while (list(,$v) = each($array)); var_dump(current($array));

Options

  • Abool(false)
  • Bint(3)
  • Cint(1)
  • DNULL
  • EArray

How the community answered

(55 responses)
  • A
    75% (41)
  • B
    4% (2)
  • C
    5% (3)
  • D
    15% (8)
  • E
    2% (1)

Community Discussion

No community discussion yet for this question.

Full 200-500 Practice