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 1 Question 79 Discussion

Actual exam question for Zend's 200-710 exam
Question #: 79
Topic #: 1
[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:

Ciara
2 months ago
I'm just gonna go with D) NULL and hope I get it right. This code is like a bad magic trick - it's trying to confuse me, but I'm not falling for it!
upvoted 0 times
Jerlene
18 days ago
I agree with you, D) NULL seems like the trick answer
upvoted 0 times
...
Becky
25 days ago
I believe it's A) bool(false)
upvoted 0 times
...
Elvera
29 days ago
I'm going with C) int(1)
upvoted 0 times
...
Lewis
1 months ago
I think it's B) int(3)
upvoted 0 times
...
...
Sina
2 months ago
E) Array? Really? What kind of a trick question is this? I'm gonna go with D) NULL and hope I don't get tricked again.
upvoted 0 times
...
Chana
2 months ago
I'm pretty sure it's B) int(3). The `each()` function returns the current element of the array, so the `current()` function will return the last element, which is 3.
upvoted 0 times
Kenneth
24 days ago
I agree with you, it's B) int(3). The current function will return the last element of the array.
upvoted 0 times
...
Mitsue
29 days ago
I believe it's D) NULL. The while loop will iterate through the array and the current function will return NULL at the end.
upvoted 0 times
...
Jimmie
1 months ago
I think it's C) int(1). The current function will return the first element of the array.
upvoted 0 times
...
...
Blair
2 months ago
D) NULL is the correct answer. The `while` loop consumes all the elements of the array, so the `current()` function will return NULL.
upvoted 0 times
Natalya
30 days ago
No, it's int(3) because the loop goes through all elements.
upvoted 0 times
...
Lucy
1 months ago
D) NULL
upvoted 0 times
...
Audra
1 months ago
C) int(1)
upvoted 0 times
...
Susana
1 months ago
Actually, it will be bool(false).
upvoted 0 times
...
Oliva
1 months ago
I believe it will be int(1).
upvoted 0 times
...
Titus
1 months ago
B) int(3)
upvoted 0 times
...
Phil
2 months ago
I think the output will be NULL.
upvoted 0 times
...
Toi
2 months ago
A) bool(false)
upvoted 0 times
...
...
Augustine
2 months ago
I think the output will be bool(false). The `each()` function returns false when it reaches the end of the array, so the `current()` function will return the last element of the array, which is 3.
upvoted 0 times
Salome
2 months ago
I'm pretty sure the output will be NULL. Since the `each()` function moves the internal array pointer to the end, `current()` will return NULL because the pointer is at the end of the array.
upvoted 0 times
...
Joesph
2 months ago
I believe the output will be int(1). The `each()` function moves the internal array pointer to the next element, so `current()` will return the first element of the array, which is 1.
upvoted 0 times
...
Kristian
2 months ago
I think the output will be int(3). The `each()` function returns false when it reaches the end of the array, so the `current()` function will return the last element of the array, which is 3.
upvoted 0 times
...
...
Luisa
2 months ago
I'm not sure, but I think the output will be int(3).
upvoted 0 times
...
Bambi
3 months ago
I believe the output will be NULL.
upvoted 0 times
...
Mira
3 months ago
I think the output will be int(1).
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