New Year Sale 2026! 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 2 Question 74 Discussion

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

Contribute your Thoughts:

0/2000 characters
Dahlia
3 months ago
I agree, it's all about type juggling in PHP!
upvoted 0 times
...
Salena
3 months ago
Wait, how does that even work?
upvoted 0 times
...
Loreta
4 months ago
Definitely B, 22.2231 is correct.
upvoted 0 times
...
Alpha
4 months ago
I thought it would be 56.2!
upvoted 0 times
...
Anglea
4 months ago
The output is actually 22.2,231.
upvoted 0 times
...
Shalon
4 months ago
I practiced a question like this, and I think the output should be 22.2231, which makes me lean towards option B.
upvoted 0 times
...
Kenneth
5 months ago
I’m a bit confused. I thought echo would just print everything together, but does it treat the numbers differently?
upvoted 0 times
...
Laquita
5 months ago
I remember something similar where concatenation and addition were mixed. I feel like it might be option B, but I can't recall the exact rules.
upvoted 0 times
...
Lorriane
5 months ago
I think the first part is about adding numbers, so "22" + "0.2" should give us 22.2, but I'm not sure about the second part.
upvoted 0 times
...
Oretha
5 months ago
Alright, I've got a strategy here. I'll work through the first part, converting the strings to numbers, then tackle the second part with the concatenation. I think if I stay focused, I can figure this out.
upvoted 0 times
...
Cyril
5 months ago
I'm a bit confused on this one. I know PHP has some quirky behavior when it comes to type coercion, but I can't quite remember how it handles string addition versus concatenation. I'll need to think it through carefully.
upvoted 0 times
...
Brock
5 months ago
Okay, let me break this down step-by-step. The first part is adding two strings, so that should give me a numeric result. The second part is concatenating two numbers, so that should be straightforward.
upvoted 0 times
...
Fernanda
5 months ago
Hmm, this looks like a tricky one. I'll need to think through the order of operations and how PHP handles string addition versus concatenation.
upvoted 0 times
...
Tammi
5 months ago
No problem, I've got this. PHP's type juggling is something I'm familiar with, so I know how to handle string addition versus concatenation. I'll work through this step-by-step and nail the right answer.
upvoted 0 times
...
Lynelle
5 months ago
I think I've got this. The math element is in the http://www.w3.org/1998/Math/MathML namespace, but the question is asking about the other elements, so I'll need to focus on that.
upvoted 0 times
...
Evangelina
10 months ago
Easy peasy, it's B) 22.2231. The string addition in the first part gives us 22.2, and the second part just concatenates 23 and 1 to give us the final result.
upvoted 0 times
Silvana
8 months ago
Oh, I see. Thanks for clarifying!
upvoted 0 times
...
Milly
8 months ago
No, it's actually B) 22.2231
upvoted 0 times
...
Melinda
8 months ago
I think it's A) 220.2231
upvoted 0 times
...
...
German
10 months ago
Haha, this is a tricky one! I'm going to guess C) 22.2,231. The first part makes sense, but the second part seems to be throwing in a random comma. Classic programming humor!
upvoted 0 times
Melvin
9 months ago
I agree with you, C) 22.2,231 seems like a tricky option.
upvoted 0 times
...
Junita
9 months ago
I'm going with A) 220.2231 as my answer.
upvoted 0 times
...
Von
9 months ago
I think the correct answer is B) 22.2231.
upvoted 0 times
...
...
Jamal
10 months ago
I'm going with D) 56.2. The first part of the expression adds the two strings, which should result in 22.2, and the second part adds 23.0 to that, giving the final answer 56.2.
upvoted 0 times
...
Josue
10 months ago
The output is clearly B) 22.2231. The first part of the expression adds the two strings '22' and '0.2', resulting in the numeric value 22.2. The second part concatenates the integer 23 with the decimal 1, giving 23.1.
upvoted 0 times
Chantay
8 months ago
No problem, happy to help!
upvoted 0 times
...
Jesusa
9 months ago
Oh, I see. Thanks for clarifying!
upvoted 0 times
...
Tandra
9 months ago
No, it's actually B) 22.2231
upvoted 0 times
...
Bette
10 months ago
I think the answer is A) 220.2231
upvoted 0 times
...
...
Franchesca
11 months ago
I'm not sure, but I think the answer is B) 22.2231 because the numbers are being treated as strings in the echo statement.
upvoted 0 times
...
Cristen
11 months ago
I agree with Samira, because the echo statement will concatenate the strings and output them as a single string.
upvoted 0 times
...
Samira
11 months ago
I think the output is B) 22.2231.
upvoted 0 times
...

Save Cancel