Re: [Zend Engine 2] Re: [PHP-DEV] Constants
| From: | Andi Gutmans | Date: | Mon, 03 Dec 2001 20:58:48 +0000 |
| Subject: | Re: [Zend Engine 2] Re: [PHP-DEV] Constants | ||
| References: | 1 2 3 4 5 6 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-72381@lists.php.net to get a copy of this message | ||
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 there are only 5 constants in the Zend Engine which are case-insensitive. I realize that. Perhaps _ex() versions of hash functions could take a flag indicating which hash function to use. This may come in handy not just for constants, you know.I still don't understand why you think it's suitable. If I want to lookup a constant FOO_Bar. How would you know if the hash function you want to use is case-sensitive or not? In any case, you used to be able to specify a different hash function in hash_init() but it was never used and for performance reasons we inline'd the hash function. Andi