Re: Re: Handling of constants in strings
| From: | Uwe Birkenhain | Date: | Fri, 05 Jul 2002 07:52:42 +0000 |
| Subject: | Re: Re: Handling of constants in strings | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-105593@lists.php.net to get a copy of this message | ||
Miguel Cruz schrieb in Nachricht ...
>On Tue, 2 Jul 2002, Uwe Birkenhain wrote:
>> A question - since english is not my first language - what do you mean
with
>> >It's not all that common to bury constants in strings
>>
>> Is something bad about it?
>
>I think so. It would slow parsing down to a crawl and create a host of
>ambiguities if every letter that ever appeared in a string had to be
>compared against the list of defined constants (after all, you might have
>a constant called 'a'). With normal variables, it only has to worry about
>it when there's a $ before it or {} around it, which is much simpler.
>
>miguel
Yeah,
you are right about that!
But since you have to take the constant out of the string (with {} or ". .")
it shouldn't be a problem to use constants.
Correct?
Uwe