<<< 運算子稱為 **Heredoc**,用於定義多行字串,保留縮排、換行與變數插值,相當於雙引號字串。
$author = 'wixy'; echo <<<_END This is a Headline This is the first line. This is the second line. --- Written by $author. _END;
<<<_END 後必須換行。_END; **必須獨佔一行**,前後不可有空白或註解。EOF, HTML),只需首尾一致。$out = <<<_END_END;$title
$content
Heredoc 是 PHP 撰寫多行字串的最佳實踐之一。