Friday, May 18, 2018

here docs

$x = <<<THE_END
PHP stands for "PHP: Hypertext Preprocessor".
The acronym "PHP" is therefore, usually referred to as a recursive acronym because the long form contains the acronym itself.
As this text is 'being' written in a here-doc there is no need to escape the double quotes.
THE_END;
print $x;
Output:
PHP stands for "PHP: Hypertext Preprocessor".
The acronym "PHP" is therefore, usually referred to as a recursive acronym because the long form contains the acronym itself.
As this text is 'being' written in a here-doc there is no need to escape the double quotes.

No comments:

Post a Comment

here docs

$x = <<<THE_END PHP stands for "PHP: Hypertext Preprocessor". The acronym "PHP" is therefore, usually referre...