Zend
200-530 · Question #39100
What is the output of the following code? 1 <?php 2 for ($i = 0; $i < 1.02; $i += 0.17) { 3 $a[$i] = $i; 4 } 5 echo count($a); 6 ?>
The correct answer is B. 1. See the full explanation below for the reasoning.
Question
What is the output of the following code? 1 <?php 2 for ($i = 0; $i < 1.02; $i += 0.17) { 3 $a[$i] = $i; 4 } 5 echo count($a); 6 ?>
Options
- A0
- B1
- C2
- D6
- E7
How the community answered
(29 responses)- A17% (5)
- B72% (21)
- C7% (2)
- E3% (1)
Community Discussion
No community discussion yet for this question.