National_Instruments
200-500 · Question #106
What is the output of the following code? 1 <?php 2 $a = 'a'; $b = 'b'; 3 echo isset($c) ? $a.$b.$c : ($c = 'c').'d'; 4 ?>
The correct answer is B. cd. See the full explanation below for the reasoning.
Question
What is the output of the following code? 1 <?php 2 $a = 'a'; $b = 'b'; 3 echo isset($c) ? $a.$b.$c : ($c = 'c').'d'; 4 ?>
Options
- Aabc
- Bcd
- C0d
How the community answered
(37 responses)- A11% (4)
- B84% (31)
- C5% (2)
Community Discussion
No community discussion yet for this question.