This is an old revision of the document!
Request for Comments: Allow HEREDOC syntax with double quotes
- Version: 0.1
- Date: 2008-03-22
- Author: Lars Strojny
- Status: Under Discussion
- Votes: (2 pro/4 contra)
In 5_3 we introduced NOWDOC in and it would be logical to allow a double quoted syntax sister of NOWDOC which acts as HEREDOC. The reason to do this is mainly consistency with with variable declarations:
$var = '$var'; // Literally $var = "$var"; // Intepreted
$var = "Hello world"; $str = <<<LABEL $var LABEL;
“$var” is evaluated
$str = <<<'LABEL' $var LABEL;
“$var” is taken literally
$var = 'Hello world'; $str = <<<"LABEL" $var LABEL;
“$var” would be intepreted.