Josh wrote:
> Dave, how is a variable name any less a bareword than a constant name?
>
A bareword (in my opinion) is a word without a sigil (e.g. a leading $),
so the way that you would write a constant normally in PHP. What I was
trying to say is that having bareword-style interpolation ("{MYCO
useless.
Regards,
Mike Willbanks
Sent via BlackBerry from T-Mobile
-Original Message-
From: "Richard Black" <[EMAIL PROTECTED]>
Date: Wed, 29 Oct 2008 10:51:13
To: Josh<[EMAIL PROTECTED]>
Cc:
Subject: RE: [PHP-DEV] Constants in double-quoted strings
I think this wo
ibute this message, or open any attachments.
-Original Message-
From: Josh [mailto:[EMAIL PROTECTED]
Sent: 29 October 2008 10:45
To: Dave Ingram
Cc: Paweł Stradomski; internals@lists.php.net; Arvids Godjuks
Subject: Re: [PHP-DEV] Constants in double-quoted strings
Dave, how is a variable nam
Dave, how is a variable name any less a bareword than a constant name?
Thats what the backets were for, perhaps combined with a symbol to
make it even less likely, and of course if the constant is not found
in the symbol table, the constant name would be outputted directly.
On Wed, Oct 29, 2008 at
> 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 ju
W liście Arvids Godjuks z dnia środa 29 października 2008:
> People, when you will start to learn that such approach is a mess?
> First, use ' ' instead of " " and format your SQL better and you woun't
> have any problems:
>
> define ('STATUS_ACTIVE', 1);
> define ('NUM_PER_PAGE', 25);
> $q = 'SEL
People, when you will start to learn that such approach is a mess?
First, use ' ' instead of " " and format your SQL better and you woun't have
any problems:
a). It's more readable without syntax highlighting
b). It's just faster.
c). It's a good style.
d). I think if that is easy to do, it would