Nowdoc

• similar to HEREDOC, but no parsing is conducted

• same <<< identifier, but the identifier must be enclosed in single quotes

• Do not indent ending identifier or add any chars

<?php
$string = <<<'DEMO'
 PHP Code
DEMO;

echo $string;
?>

Leave a Reply

Your email address will not be published. Required fields are marked *