Cyber Monday 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
2 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
28 days ago
I agree with option B, int(3)
upvoted 0 times
...
Sherman
1 months ago
I'm going with bool(false)
upvoted 0 times
...
Mireya
1 months ago
I believe it will be NULL
upvoted 0 times
...
Kristel
1 months ago
I think the output will be int(1)
upvoted 0 times
...
...
Harris
3 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
2 months ago
I agree with you, I'll choose Array
upvoted 0 times
...
Toshia
2 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
3 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
3 months ago
I'm not sure, but I think it might be bool(false).
upvoted 0 times
...
Leigha
3 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
3 months ago
I think it will be option D, NULL.
upvoted 0 times
...
...
Margo
3 months ago
I believe the output will be NULL.
upvoted 0 times
...
Marva
3 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
3 months ago
No, it's actually bool(false).
upvoted 0 times
...
Rose
3 months ago
I think the output is int(3).
upvoted 0 times
...
...
Nan
4 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
2 months ago
I agree with you, it should be bool(false).
upvoted 0 times
...
Devora
2 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
3 months ago
I think the output will be int(1).
upvoted 0 times
...
Brett
3 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
3 months ago
I believe it will be NULL because the array has been exhausted by the while loop.
upvoted 0 times
...
Dawne
3 months ago
I think it will be int(1) because current() will return the first element's value.
upvoted 0 times
...
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77