Re: Patches for case insensitive in_array, bug id 12192

From: Date: Sun, 30 Mar 2003 18:37:08 +0000
Subject: Re: Patches for case insensitive in_array, bug id 12192
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-506@lists.php.net to get a copy of this message
At 20:24 30.03.2003, Andrei Zmievski wrote:
On Sun, 30 Mar 2003, Mike Robinson wrote: ATM, in_array() takes 2 args and 1 parameter. Adding 1 more wouldn't hurt, doesn't break BC, and provides some added usefulness. And slows down the inner loop of searching.
If thats the only problem the patch can be rewritten to have only one additional assembler operation (or was it three to get an address?) for the inner loop (indeed i would suggest so).
IMHO, this would be a handy feature, and if it were added I can't imagine having to extend in_array any further. Does 'please' help? :) Can't imagine? Look in the archives. One of the proposals included having an option to tell in_array() to move the internal array pointer to the found element.
this is the real problem...and to add another one: why not supply a user defined compare function (not that it makes sense really). marcus

« previous php.internals (#506) next »