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)- A4% (1)
- B19% (5)
- C70% (19)
- D7% (2)
Community Discussion
No community discussion yet for this question.