nerdexam
Zend

200-530 · Question #120

What will be the output of the following PHP code? <?php $a = "hi,world"; $b = array_map("strtoupper", explode(",", $a)); foreach($b as $value) { print "$value"; } ?>

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

Question

What will be the output of the following PHP code? <?php $a = "hi,world"; $b = array_map("strtoupper", explode(",", $a)); foreach($b as $value) { print "$value"; } ?>

Options

  • AHI,WORLD
  • BThe script will throw an error.
  • CHI WORLD
  • Dhiworld

How the community answered

(27 responses)
  • A
    4% (1)
  • B
    19% (5)
  • C
    70% (19)
  • D
    7% (2)

Community Discussion

No community discussion yet for this question.

Full 200-530 Practice