Zend
200-710 · Question #190
What will be the output value of the following code? ``php $array = array(1,2,3); while (!list($v) = each ($array)) var_dump (current ($array)); ``
The correct answer is A. bool(false). See the full explanation below for the reasoning.
Arrays
Question
What will be the output value of the following code?
$array = array(1,2,3);
while (!list($v) = each ($array))
var_dump (current ($array));
Options
- Abool(false)
- Bint(3)
- Cint(1)
- DNULL
- EArray
How the community answered
(36 responses)- A78% (28)
- B3% (1)
- C3% (1)
- D11% (4)
- E6% (2)
Topics
#list()#each()#array traversal#current()
Community Discussion
No community discussion yet for this question.