Deal of The Day! 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 4 Question 89 Discussion

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

Which value will be assigned to the key 0 in this example?

$foo = array(true, '0' => false, false => true);

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

Antonio
1 days ago
Is this some kind of sorcery? I thought arrays were supposed to be simple. This is giving me a headache.
upvoted 0 times
...
Lonny
3 days ago
I agree with Yoko, the value assigned to key 0 will be true based on the example provided.
upvoted 0 times
...
Nikita
4 days ago
I'm so done with these tricky PHP array assignments. Time to switch to Python!
upvoted 0 times
...
Yoko
4 days ago
But in the example, '0' is assigned to false, so the value for key 0 should be true.
upvoted 0 times
...
Ernest
8 days ago
I disagree, I believe the value assigned to key 0 will be false.
upvoted 0 times
...
Yoko
9 days ago
I think the value assigned to key 0 will be true.
upvoted 0 times
...
Sharita
11 days ago
Oh, I see. So the value assigned to key 0 will indeed be false in this case.
upvoted 0 times
...
Rory
12 days ago
But in this example, the key 0 is assigned the value false because it is explicitly set in the array.
upvoted 0 times
...
Laticia
24 days ago
I think the value assigned to key 0 will be true.
upvoted 0 times
...
Virgina
28 days ago
Haha, this question is trying to trick us! It's obviously true, because the first value in the array is true.
upvoted 0 times
Fernanda
17 days ago
I think it's true too, because the first value in the array is true.
upvoted 0 times
...
...
Sean
1 months ago
Wait, what? How can false be assigned to a key and true to another key? This is some weird PHP sorcery!
upvoted 0 times
Brittni
16 days ago
Yeah, PHP can be a bit confusing with its array key assignments sometimes.
upvoted 0 times
...
Dudley
22 days ago
In this case, the key 0 will be assigned the value true because it's the first element in the array.
upvoted 0 times
...
Oliva
1 months ago
It's just how PHP works, keys can be assigned any value regardless of their type.
upvoted 0 times
...
...
Rory
2 months ago
The value assigned to key 0 will be false.
upvoted 0 times
...
Zona
2 months ago
I'm pretty sure it's false, since '0' is explicitly assigned to the key.
upvoted 0 times
Tandra
18 days ago
So, the value assigned to the key 0 will be false in this case.
upvoted 0 times
...
Virgilio
22 days ago
Yes, that's correct. The key 0 is explicitly assigned to false in this example.
upvoted 0 times
...
Leigha
24 days ago
I think you're right, the value assigned to the key 0 is false.
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