Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62371 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62779 invoked from network); 21 Aug 2012 22:14:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Aug 2012 22:14:01 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.170 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 74.125.82.170 mail-we0-f170.google.com Received: from [74.125.82.170] ([74.125.82.170:34678] helo=mail-we0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 65/6B-10139-82804305 for ; Tue, 21 Aug 2012 18:14:00 -0400 Received: by weyr1 with SMTP id r1so220566wey.29 for ; Tue, 21 Aug 2012 15:13:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=Dxxr1hsTRFPtVVGirxcpolULY2xs/nDlGLkLK+bOJu4=; b=WfYBW1Rm5AIDk97xvxotkuirrq4HtqbPF/UD1KZuu860WQZH4+ZGdvtz9Wa3BXXOUl BLtV7h7UDgGs2R1ozd9rXgHVDoLIUj0kLGG5L0KPq25PncA0ofUjPM1aaKjDSIw5kh8B 0Xuph6rf8w3c3A3mpwBsDcw6G17E+KEsA5R8yfFA8IaZmzDDaBgQOuld+w6e8CKcciyJ S4h9tM43OSrmdpSFmlbG+ZrXimZ9PYsCc/7DC9OisH10LxfKPKXvPf22QsV5YYG1REuq cG8S7A0zvv8QhUiUX468gqzPGAH+JEf+KGlEVtwuOE/iExUTAzBB2UTMbt/n2BX6xd4Q U/TQ== Received: by 10.180.74.33 with SMTP id q1mr344692wiv.4.1345587236794; Tue, 21 Aug 2012 15:13:56 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.223.86.201 with HTTP; Tue, 21 Aug 2012 15:13:15 -0700 (PDT) In-Reply-To: References: <5033E0BC.8040507@ajf.me> <5033EAAB.6090502@ajf.me> <5033F1EA.4070701@ajf.me> <5033FD9C.6080106@ajf.me> <5033FF96.5030105@ajf.me> <5034017E.1020002@ajf.me> Date: Wed, 22 Aug 2012 07:13:15 +0900 X-Google-Sender-Auth: 5Jv2ZQYamGvF8OwDv6vfh_oVTUc Message-ID: To: Levi Morrison Cc: Andrew Faulds , Tjerk Anne Meesters , Rasmus Schultz , internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] re: removing an item from an array From: yohgaki@ohgaki.net (Yasuo Ohgaki) Hi, I see why with new Criticism section in the wiki page. You've also misunderstood that array_udelete() is array_walk() variant, not array_filter(). This may be the good reason why we should have array_udelete :) Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net 2012/8/22 Yasuo Ohgaki : > 2012/8/22 Levi Morrison : >> On Tue, Aug 21, 2012 at 3:45 PM, Andrew Faulds wrote: >>> On 21/08/12 22:43, Levi Morrison wrote: >>>> >>>> There is a reason to have a callable provided: custom comparison. >>>> Other array functions solve this by providing a `u` alternative: >>>> >>>> `int array_udelete(&$array, $value, bool function($value, $key))` >>>> >>>> Let's not deviate from established array naming conventions. (Yasuo, >>>> I'm looking at you) >>>> >>>> Cheers, >>>> >>>> Levi Morrison >>> >>> Yeah, this looks like a good solution and we have the best of both worlds. >>> >>> We get int array_delete(&$array, $value, $strict=TRUE); and int >>> array_udelete(&$array, $value, $callback=bool function ($value $key)); >>> >>> :) >>> >>> >> >> I'll still vote no on the RFC if it ever comes to it :) >> >> I'm only contributing here because I don't want pure madness to ever >> come to a vote when I'm absent and get voted in . . . > > Just curious why? > > Regards, > > -- > Yasuo Ohgaki > yohgaki@ohgaki.net