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 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:

Evangelina
23 days 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
...
German
1 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
...
Jamal
1 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
1 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
Bette
27 days ago
I think the answer is A) 220.2231
upvoted 0 times
...
...
Franchesca
2 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
2 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
2 months ago
I think the output is B) 22.2231.
upvoted 0 times
...

Save Cancel