Complete the code to start a heredoc string with the identifier TEXT.
<?php
$heredoc = <<<[1]
This is a heredoc string.
TEXT;
?>Heredoc syntax starts with <<<IDENTIFIER where IDENTIFIER is an unquoted label like TEXT.
Complete the code to start a nowdoc string with the identifier DATA.
<?php $nowdoc = <<<'[1]' This is a nowdoc string. DATA; ?>
Nowdoc syntax uses single quotes around the identifier after <<<, like <<<'DATA'.
Fix the error in the heredoc closing label to properly end the string.
<?php
$text = <<<EOT
Hello, world!
[1];
?>The closing label must exactly match the starting identifier and be at the start of the line with no indentation.
Fill both blanks to create a heredoc string that includes a variable $name.
<?php $name = "Alice"; $message = <<<[1] Hello, [2]! [1]; ?>
The heredoc identifier can be any label like GREETING. Variables inside heredoc are parsed, so use $name.
Fill all three blanks to create a nowdoc string that includes the literal text $name without parsing.
<?php $name = "Bob"; $text = <<<'[1]' Hello, [2]! [3]; ?>
Nowdoc uses single quotes around the identifier DATA. Inside nowdoc, variables like $name are not parsed and appear as literal text. The closing label must match the identifier exactly.