BlackFriday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Zend Exam 200-710 Topic 2 Question 73 Discussion

Actual exam question for Zend's 200-710 exam
Question #: 73
Topic #: 2
[All 200-710 Questions]

What will be the output value of the following code?

$array = array(1,2,3);

while (list(,$v) = each($array));

var_dump(current($array));

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

Elmira
1 months ago
Haha, this question is a real brain-teaser! I'm going to go with option B, int(3), because that's the only answer that seems somewhat logical.
upvoted 0 times
Johana
5 days ago
I agree with option B, int(3)
upvoted 0 times
...
Sherman
9 days ago
I'm going with bool(false)
upvoted 0 times
...
Mireya
15 days ago
I believe it will be NULL
upvoted 0 times
...
Kristel
21 days ago
I think the output will be int(1)
upvoted 0 times
...
...
Harris
2 months ago
Wait, what? This question is as clear as mud. I'll just go with option E, Array, because that's the only answer that makes sense to me.
upvoted 0 times
Corrie
1 months ago
I agree with you, I'll choose Array
upvoted 0 times
...
Toshia
1 months ago
I'm going with bool(false)
upvoted 0 times
...
Leontine
2 months ago
I believe it will be NULL
upvoted 0 times
...
Viva
2 months ago
I think the output will be int(1)
upvoted 0 times
...
...
Kendra
2 months ago
I think the output will be int(3) because the current function returns the current element in an array.
upvoted 0 times
...
Claudio
2 months ago
I'm not sure, but I think it might be bool(false).
upvoted 0 times
...
Leigha
2 months ago
I'm not sure about this one. The code looks a bit weird, but I'm going to go with option D, NULL, just to be safe.
upvoted 0 times
Lauran
2 months ago
I agree, let's go with option D.
upvoted 0 times
...
Lenna
2 months ago
I think it will be option D, NULL.
upvoted 0 times
...
...
Margo
2 months ago
I believe the output will be NULL.
upvoted 0 times
...
Marva
2 months ago
I think the output will be int(1).
upvoted 0 times
...
Juan
3 months ago
No way, the output is clearly int(3)! The while loop just iterates through the array, and current() will return the last element.
upvoted 0 times
Mammie
2 months ago
No, it's actually bool(false).
upvoted 0 times
...
Rose
2 months ago
I think the output is int(3).
upvoted 0 times
...
...
Nan
3 months ago
Hmm, I think the output will be bool(false), since the while loop has already exhausted the array and current() will return the last element's value.
upvoted 0 times
Christa
1 months ago
I agree with you, it should be bool(false).
upvoted 0 times
...
Devora
1 months ago
I'm pretty sure it will be int(3).
upvoted 0 times
...
Quentin
2 months ago
I believe it will be NULL.
upvoted 0 times
...
Shenika
2 months ago
I think the output will be int(1).
upvoted 0 times
...
Brett
2 months ago
I agree with you, the output should be bool(false) as current() will return false after the while loop.
upvoted 0 times
...
Aliza
2 months ago
I believe it will be NULL because the array has been exhausted by the while loop.
upvoted 0 times
...
Dawne
2 months ago
I think it will be int(1) because current() will return the first element's value.
upvoted 0 times
...
...

Save Cancel