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 200-710 Exam - Topic 5 Question 104 Discussion

What is the output of the following code?echo "22" + "0.2", 23 . 1;
B) 22.2231
A) 220.2231
C) 22.2,231
D) 56.2

Zend 200-710 Exam - Topic 5 Question 104 Discussion

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

What is the output of the following code?

echo "22" + "0.2", 23 . 1;

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

0/2000 characters
Miesha
3 days ago
The first part adds numbers, so it's 22.2.
upvoted 0 times
...
Amalia
8 days ago
I disagree, it's not that simple.
upvoted 0 times
...
Rikki
13 days ago
Definitely A) 220.2231, no doubt!
upvoted 0 times
...
Marta
19 days ago
Wait, are we sure about that? Sounds off.
upvoted 0 times
...
Taryn
24 days ago
I think it's actually B) 22.2231.
upvoted 0 times
...
Carey
29 days ago
It's 22.2,231 for sure!
upvoted 0 times
...
Hoa
1 month ago
Definitely not C) 22.2,231.
upvoted 0 times
...
Loise
1 month ago
No way, it can't be that simple!
upvoted 0 times
...
Joseph
1 month ago
Wait, how does that even work?
upvoted 0 times
...
Leonora
2 months ago
Totally agree with that!
upvoted 0 times
...
Felix
2 months ago
It's B) 22.2231, right?
upvoted 0 times
...
Stephania
2 months ago
I’m confused about how PHP handles types here. I thought it would be 22.2,231, but that doesn’t seem right now.
upvoted 0 times
...
Mozell
2 months ago
I feel like the output could be 220.2231 if it treats the first part as a string concatenation instead of addition.
upvoted 0 times
...
Toi
2 months ago
I remember something similar from practice where string concatenation was involved. I think it might be 22.2231, but I could be wrong.
upvoted 0 times
...
Ilene
3 months ago
I think the first part is adding "22" and "0.2", which might give us 22.2, but I'm not sure about the second part.
upvoted 0 times
...
Dahlia
3 months ago
I feel like I practiced this kind of question before, but I can't recall the exact rules for type juggling in PHP.
upvoted 0 times
...
Charlette
3 months ago
I'm a bit confused about how PHP handles strings and numbers. Is it possible for the output to be 220.2231?
upvoted 0 times
...
Merri
3 months ago
I remember something similar where concatenation and addition were mixed. Could it be option B?
upvoted 0 times
...
Graciela
5 months ago
I think the first part is adding the numbers, so it might be 22.2? But I'm not sure about the second part.
upvoted 0 times
...

Save Cancel