Re: Re: Handling of constants in strings

From: Date: Fri, 05 Jul 2002 19:00:46 +0000
Subject: Re: Re: Handling of constants in strings
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-105716@lists.php.net to get a copy of this message
On Fri, 5 Jul 2002, Uwe Birkenhain wrote: > Miguel Cruz schrieb ... >> 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. > > 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? Correct. miguel

« previous php.general (#105716) next »