Re: [PHP-DEV] Constants inside strings, sometimes

2002-12-17 Thread Andi Gutmans
At 05:16 PM 12/17/2002 +, Philip Olson wrote: Hello, I stumbled upon this feature today and am wondering why it exists: 'apple', 'b' => 'banana', 'c' => 'cranberry'); echo "a $arr[a] \n"; // apple echo "b {$arr[a]} \n"; // banana (???) echo "c {$arr['a']} \n

[PHP-DEV] Constants inside strings, sometimes

2002-12-17 Thread Philip Olson
Hello, I stumbled upon this feature today and am wondering why it exists: 'apple', 'b' => 'banana', 'c' => 'cranberry'); echo "a $arr[a] \n"; // apple echo "b {$arr[a]} \n"; // banana (???) echo "c {$arr['a']} \n"; // apple echo "d $arr[b] \n"; // banana ec

Re: [PHP-DEV] Constants

2002-02-13 Thread Lars Torben Wilson
On Wed, 2002-02-13 at 17:22, Evan Nemerson wrote: > I was thinking about putting together a list of constants, their purpose, > what version of PHP they initially appeared in, etc. > > So far, I have figured out a function called "REGISTER_LONG_CONSTANT" is > used, or a constant is defined in t

[PHP-DEV] Constants

2002-02-13 Thread Evan Nemerson
I was thinking about putting together a list of constants, their purpose, what version of PHP they initially appeared in, etc. So far, I have figured out a function called "REGISTER_LONG_CONSTANT" is used, or a constant is defined in the source with a name that has a preceeding "PHP_" (eg "PHP

[PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Constants

2001-12-03 Thread Andi Gutmans
At 02:55 PM 12/3/2001 -0600, Andrei Zmievski wrote: >On Mon, 03 Dec 2001, Andi Gutmans wrote: > > Because some of the keys are case-insensitive and some aren't. Case > > insensitive hashes don't work if you want to mix the keys. > > In any case, I think the solution above is a good one because the

[PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Constants

2001-12-03 Thread Andrei Zmievski
On Mon, 03 Dec 2001, Andi Gutmans wrote: > Because some of the keys are case-insensitive and some aren't. Case > insensitive hashes don't work if you want to mix the keys. > In any case, I think the solution above is a good one because there are > only 5 constants in the Zend Engine which are ca

[PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Constants

2001-12-03 Thread Andi Gutmans
At 02:42 PM 12/3/2001 -0600, Andrei Zmievski wrote: >On Mon, 03 Dec 2001, Andi Gutmans wrote: > > Personally I wouldn't write code which gives FOO_BAR and Foo_BAR two > > different meanings but I think you are right that it'd be better and I > have > > an idea on how to do it which I'll lay out.

[PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Constants

2001-12-03 Thread Andrei Zmievski
On Mon, 03 Dec 2001, Andi Gutmans wrote: > Personally I wouldn't write code which gives FOO_BAR and Foo_BAR two > different meanings but I think you are right that it'd be better and I have > an idea on how to do it which I'll lay out. > We are only talking about global constants defined with de

Re: [PHP-DEV] Constants

2001-12-03 Thread Andi Gutmans
At 01:03 PM 12/3/2001 -0600, Andrei Zmievski wrote: >On Mon, 03 Dec 2001, Andi Gutmans wrote: > > Hi, > > > > I'm trying to wrap up the class wide constants in ZE2. I implemented them > > so that class wide constants are case-sensitive. I think in general, > > although ZE1 allows you to define cas

Re: [PHP-DEV] Constants

2001-12-03 Thread Andrei Zmievski
On Mon, 03 Dec 2001, Andi Gutmans wrote: > Hi, > > I'm trying to wrap up the class wide constants in ZE2. I implemented them > so that class wide constants are case-sensitive. I think in general, > although ZE1 allows you to define case-insensitive constants it's better > for performance and f

Re: [PHP-DEV] Constants

2001-12-03 Thread Jon Parise
On Mon, Dec 03, 2001 at 08:24:29PM +0200, Andi Gutmans wrote: > a) There are almost no constants in PHP which are case-insensitive (which > aren't user land defined with define()). Actually the only ones I could > find are in the Zend Engine such as TRUE & FALSE which makes sense. All PHP > e

[PHP-DEV] Constants

2001-12-03 Thread Andi Gutmans
Hi, I'm trying to wrap up the class wide constants in ZE2. I implemented them so that class wide constants are case-sensitive. I think in general, although ZE1 allows you to define case-insensitive constants it's better for performance and for general esthetics. I have two issues I'd like to