nerdexam
Zend

200-550 · Question #47

What is the output of the following code? $text = 'This is text'; $text1 = <<<'TEXT' $text TEXT; $text2 = <<<TEXT $text1 TEXT; echo "$text2";

The correct answer is B. $text. See the full explanation below for the reasoning.

Question

What is the output of the following code? $text = 'This is text'; $text1 = <<<'TEXT' $text TEXT; $text2 = <<<TEXT $text1 TEXT; echo "$text2";

Options

  • AThis is text
  • B$text
  • C$text1
  • D$text2

How the community answered

(55 responses)
  • A
    4% (2)
  • B
    76% (42)
  • C
    5% (3)
  • D
    15% (8)

Community Discussion

No community discussion yet for this question.

Full 200-550 Practice