nerdexam
Zend

200-530 · Question #387

What will be the output of the following PHP script? <?php $array = array('a' => 'One', 'b' => 'Two', 'c' => array('d' => 'Three', 'e' => 'Four')); function print_element($array) { extract($array)…

The correct answer is C. Four. See the full explanation below for the reasoning.

Question

What will be the output of the following PHP script? <?php $array = array('a' => 'One', 'b' => 'Two', 'c' => array('d' => 'Three', 'e' => 'Four')); function print_element($array) { extract($array); return $c['e']; } print print_element ($array); ?>

Options

  • AThree
  • BTwo
  • CFour
  • DOne

How the community answered

(25 responses)
  • A
    8% (2)
  • B
    8% (2)
  • C
    80% (20)
  • D
    4% (1)

Community Discussion

No community discussion yet for this question.

Full 200-530 Practice