Zend
200-530 · Question #134
What is the output of the following code? 1 <?php 2 function append($str) 3 { 4 $str = $str.'append'; 5 } 7 function prepend(&$str) 8 { 9 $str = 'prepend'.$str; 10 } 12 $string = 'zce'; 13…
The correct answer is C. prependzce. See the full explanation below for the reasoning.
Question
What is the output of the following code? 1 <?php 2 function append($str) 3 { 4 $str = $str.'append'; 5 } 7 function prepend(&$str) 8 { 9 $str = 'prepend'.$str; 10 } 12 $string = 'zce'; 13 append(prepend($string)); 14 echo $string; 15 ?> Zend 200-530 Exam
Options
- Azceappend
- Bprependzceappend
- Cprependzce
- Dzce
How the community answered
(35 responses)- A14% (5)
- B3% (1)
- C74% (26)
- D9% (3)
Community Discussion
No community discussion yet for this question.