Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:31721 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86858 invoked by uid 1010); 18 Aug 2007 22:49:08 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 86839 invoked from network); 18 Aug 2007 22:49:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Aug 2007 22:49:07 -0000 Authentication-Results: pb1.pair.com header.from=dz@bitxtender.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=dz@bitxtender.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain bitxtender.com from 80.237.132.12 cause and error) X-PHP-List-Original-Sender: dz@bitxtender.com X-Host-Fingerprint: 80.237.132.12 wp005.webpack.hosteurope.de Received: from [80.237.132.12] ([80.237.132.12:59443] helo=wp005.webpack.hosteurope.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B5/85-45675-F5777C64 for ; Sat, 18 Aug 2007 18:49:05 -0400 Received: from [87.79.35.58] (helo=[192.168.0.164]); authenticated by wp005.webpack.hosteurope.de running ExIM using esmtpsa (TLSv1:RC4-SHA:128) id 1IMX6L-00038U-7G; Sun, 19 Aug 2007 00:49:01 +0200 In-Reply-To: <7f3ed2c30708150759p56b99921v1f589dcc107e743d@mail.gmail.com> References: <7f3ed2c30708150759p56b99921v1f589dcc107e743d@mail.gmail.com> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-ID: Cc: "PHP Development" Content-Transfer-Encoding: 7bit Date: Sun, 19 Aug 2007 00:48:58 +0200 To: Hannes Magnusson X-Mailer: Apple Mail (2.752.2) X-bounce-key: webpack.hosteurope.de;dz@bitxtender.com;1187477345;239cbeb0; Subject: Re: [PHP-DEV] [PATCH] New parameter for in_array() & array_search() From: dz@bitxtender.com (=?ISO-8859-1?Q?David_Z=FClke?=) 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/-- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php