Re: [RFC] Double quoted NOWDOC is HEREDOC
| From: | Lars Strojny | Date: | Sat, 29 Mar 2008 11:36:25 +0000 |
| Subject: | Re: [RFC] Double quoted NOWDOC is HEREDOC | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-36672@lists.php.net to get a copy of this message | ||
Hi Felipe,
Am Freitag, den 28.03.2008, 20:28 -0300 schrieb Felipe Pena:
> 2008/3/24, Marcus Boerger <helly@php.net>:
[...]
> +1 for same reason.
>
> However, the patch is wrong, see below:
>
> $foo = 'foobar';
>
> $test = <<<"a
> $foo
> a;
>
> var_dump($test);
> /*
> string(7) "foobar
> "
> */
>
> $test = b<<<"a"
> $foo
> a;
>
> /*
> Parse error: syntax error, unexpected $end
> */
>
> Here's a possible fix:
> - http://felipe.ath.cx/diff/double-quote-heredoc.diff
Thanks for bringing this up, didn't thought about that. I will create a
number of tests to cover that properly.
cu, Lars
Attachment: [application/pgp-signature] Dies ist ein digital signierter Nachrichtenteil signature.asc
Attachment: [application/pgp-signature] Dies ist ein digital signierter Nachrichtenteil signature.asc