Zend
200-710 · Question #10
What is the output of the following code? echo '1' . (print '2') + 3;
The correct answer is D. 214. See the full explanation below for the reasoning.
PHP Basics
Question
What is the output of the following code?
echo '1' . (print '2') + 3;
Options
- A123
- B213
- C142
- D214
- ESyntax error
How the community answered
(60 responses)- A2% (1)
- B8% (5)
- C3% (2)
- D82% (49)
- E5% (3)
Topics
#operator precedence#print return value#concatenation#type coercion
Community Discussion
No community discussion yet for this question.