What is the output of the following code?
What is the output of the following code?
The output of the code is 'This is text'. This is because the code uses a 'heredoc' syntax in PHP, which allows the definition of multiline strings. The line $text1 = <<<‘TEXT’ $text TEXT; assigns the value of the variable $text (which is 'This is text') to $text1. Then, $text2 = <<<TEXT $text1 TEXT; assigns the value of $text1 to $text2. Finally, echo $text2; outputs 'This is text'.
Correct answer is A <?php // Enter your code here, enjoy! $text ='this is text'; $text1 = <<<TEXT $text TEXT; $text2 = <<<TEXT $text1 TEXT; echo $text2; Output : this is text