One more thing: the closing tag is not "whatever you give", it must be a valid identifier with alphanumerics only (underscores are fine), if you give it any other character you'll be sorely disappointed.
Look:
$str = <<<'HEY WHAT THE HECK'
This will not work
and doesn't help you understand why
HEY WHAT THE HECK
;
PHP will give you a syntax error.
Now if you remove the spaces,
$str = <<<'HEYWHATTHEHECK'
Suddenly it's all peaches & cream
HEYWHATTHEHECK
;
(I just tried to use some UUID to make sure it won't happen inside the string. After 25 minutes of swearing I finally realized this.)
Happy nowdocking!