Re: nowdocs again

From: Date: Wed, 30 Jan 2008 19:59:42 +0000
Subject: Re: nowdocs again
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-35040@lists.php.net to get a copy of this message
Greg Beaver wrote:
Dmitry Stogov wrote:
The feature is very useful, however, I agree, the syntax would be better. :) The current syntax: $var = <<<'TEXT' text TEXT;
I would like to see nowdocs. The closest equivalent in another syntax I can think of is xml's CDATA. Perhaps we can borrow something similar to that syntax $var = <<<CDATA[ string here ]CDATA;
No, please, let's not further promote CDATA abuse. Everyone seems to think that CDATA is some sort of binary-clean way to toss any junk they want into an XML file which isn't even close to being true. I don't think the 'FOO' syntax is very obvious either, but I can't think of a better one and if there isn't a commonly known syntax we can steal from another language, then making up our own, no matter what it is, is going to be non-obvious to a lot of people. -Rasmus

« previous php.internals (#35040) next »