Has anyone here heard of and used heredoc? I was looking through an old php book I had and it had a section about heredoc. It seems to awesome! Any opinions on it?
Here's an example of heredoc:
<?php
$content = <<<END
'a'as'as'a''//]1213=
''1/3'13/13""]]1=23
END;
echo $content;
?>
This would output:
'a'as'as'a''//]1213=
''1/3'13/13""]]1=23
It's cool because you can use all the "no-no" characters without having to escape or anything