Re: Constants in double-quoted strings
| From: | Dave Ingram | Date: | Wed, 29 Oct 2008 09:53:20 +0000 |
| Subject: | Re: Constants in double-quoted strings | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-41549@lists.php.net to get a copy of this message | ||
> I only worry it could break BC - people might have used "{SOMETEXT}" in
> strings and not expect it to be interpolated (I've done so myself).
>
I've done that a lot, and I've seen quite a bit of templating code that
does the same.
My personal opinion is that interpolating constants would just lead to
trouble, one way or another. Even something like "{#SOMETEXT}" could be
problematic. I would definitely discourage interpolation without some
sort of sigil though... barewords (in brackets or not) are too likely to
break BC.
Dave