nerdexam
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)
  • A
    2% (1)
  • B
    8% (5)
  • C
    3% (2)
  • D
    82% (49)
  • E
    5% (3)

Topics

#operator precedence#print return value#concatenation#type coercion

Community Discussion

No community discussion yet for this question.

Full 200-710 Practice