PHP中提供了<<<运算符构建多行字符串序列的方法,通常称为here-document或表示为heredoc的简写。
这种方法详细表述了字符串的字面值,并在文本中保留了字符串的下划线和其他空格(包括缩进)。例如:
<?php
$author ='wixy';
echo <<<_END
Thisis a Headline
Thisis the first line.
Thisis the second line.
---Writtenby $author.
_END;
?>
PHP解析器会将两个_END标...