Re: nowdocs again
| From: | Geoffrey Sneddon | Date: | Mon, 21 Jan 2008 15:03:20 +0000 |
| Subject: | Re: nowdocs again | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-34844@lists.php.net to get a copy of this message | ||
On 21 Jan 2008, at 13:24, Hannes Magnusson wrote:
On Jan 18, 2008 10:07 PM, Stanislav Malyshev <stas@zend.com> wrote:Disclaimer: I haven't read the old thread, but I prefer <<<~.Hi all! I remember the topic of 'nowdocs' (if you don't remember what it is, read on) was already discussed, but nothing really happened about it. For those who just recently woke up from cryogenic sleep :), "nowdocs" are heredocs extension that does not interpret the content (think single quotes instead of double quotes). Should look something like: $foo = <<<'END' blah$fooblah END unline regular heredocs, $foo would be left as-is. I think now it's good to add it to 5.3 (and I like 'FOO' syntax best of all variants).Without turning this into color of the bikeshed flame, I'd go with the orginal <<<~LABEL syntax, I think quoting the label will be easier to confuse with heredocs (I had to read your example twice, thought you accidentally used the heredoc syntax..). It is also easier to document, and search for, <<<~ than <<< 'foo'. But I trust you read the old thread and picked <<< 'foo' for a reason, so feel free to ignore my comment.
Nor from me, +1. -- Geoffrey Sneddon <http://gsnedders.com/>Any objections to this?No. +1 from me.