Re: [PATCH] New parameter for in_array() & array_search()

From: Date: Sat, 18 Aug 2007 22:48:58 +0000
Subject: Re: [PATCH] New parameter for in_array() & array_search()
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-31721@lists.php.net to get a copy of this message
Smells like feature creep. Plus, it's difficult to document. I think it would be the first function that mutates an argument depending on another argument - it would also mean that the input array is passed as a reference in case that new flag is set. Either way, not a good idea IMO. Especially in case of in_array(). David Am 15.08.2007 um 16:59 schrieb Hannes Magnusson:
Hi all Attached* is a patch introducing a new parameter to in_array() and array_search() which will set the internal pointer to the first location of $needle in the $haystack (granted that $needle exists within the $haystack). This will make it possible to search for a value in an array and then run prev()/next() on the array to get the next/previous sibling. I'd like to commit this after 5.2.4 has been released if there are no objections? -Hannes * In case it doesn't come through: http://home.nith.no/~maghan/keeppos/<keeppos.patch>-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.internals (#31721) next »