On Mar 24, 2008, at 8:59 AM, Marcus Boerger wrote:
Hello Lars,
to me this makes pretty much sense on a second glance as it perfectly
reflects what our string would do. And for someone learning 'NOWDOC',
using "HEREDOC" seems just natural.
So I am all +1
Consistency and satisfying expectations rocks!
marcus
As the original proposer of nowdocs, I also give it a +1 for
consistency!
-- Gwynne, Daughter of the Code
"This whole world is an asylum for the incurable."
Saturday, March 22, 2008, 9:17:27 PM, you wrote:
Hi,
as we introduce NOWDOC in 5.3 it would be logical to allow a double
quoted syntax sister of NOWDOC which acts as HEREDOC (same as for
$var =
"$var" vs $var = '$var'). Currently we have the following options:
$var = "Hello world";
$str = <<<LABEL
$var
LABEL;
$str = <<<'LABEL'
$var
LABEL;
The first one is HEREDOC and $var would be evaluated. The second
one is
NOWDOC and $var would be used literally. The following patch adds a
third version:
$str = <<<"LABEL"
$var
LABEL;
This acts as HEREDOC, therefore $var would be interpreted.
Comments?
cu, Lars
Best regards,
Marcus
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php