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)- A8% (2)
- B8% (2)
- C80% (20)
- D4% (1)
Community Discussion
No community discussion yet for this question.