nerdexam
National_Instruments

200-500 · Question #209

Given the following code, what will be the value of $a? $a = array('a', 'b'); array_push($a, array(1, 2));

The correct answer is D. None of the above. See the full explanation below for the reasoning.

Question

Given the following code, what will be the value of $a? $a = array('a', 'b'); array_push($a, array(1, 2));

Options

  • Aarray('a', 'b', 1, 2)
  • Barray(1, 2, 'a', 'b')
  • Carray(array(1, 2), 'a', 'b')
  • DNone of the above

How the community answered

(29 responses)
  • A
    7% (2)
  • B
    17% (5)
  • C
    3% (1)
  • D
    72% (21)

Community Discussion

No community discussion yet for this question.

Full 200-500 Practice