Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62369 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58785 invoked from network); 21 Aug 2012 21:53:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Aug 2012 21:53:05 -0000 Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.170 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.217.170 mail-lb0-f170.google.com Received: from [209.85.217.170] ([209.85.217.170:52725] helo=mail-lb0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0F/8A-10139-04304305 for ; Tue, 21 Aug 2012 17:53:05 -0400 Received: by lbbgp3 with SMTP id gp3so282899lbb.29 for ; Tue, 21 Aug 2012 14:53:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=IyfEoU7Dnrg3fsfEEYtG5fehXKDa5OG/ygUK8HPppjo=; b=RCIcRSxTbviJaiJ/GaTCUNORvCPNha6iH4X63WtWVshP48o2Sg0y19lWPVQ4kXDwyE 07BrRj6qhiJ3dMwY/RoG4eoIH3NXhaeIfU3Cgt1cThBSL5mTf3hWNuW9UrhZSvQnNLZW BNqw0BqtB+vjmZ2UskGdNEb3UYvHZgAttNKnKCy4irFpbBeol5fIMDY8Iu3boTZypYVz J2Cfi4hhJntBO33qLedAcNRt0j+Yyu/3f02EOJf2W3IdvsDIdpYmWO6te8zI5A8sPoio i6Ec9pqdoaWxDG9ZwLE0QXeqTJ7xl6w+5eis+RyOmICXNF+E1hAnEy0KrR3DsurrUmGM mr2w== MIME-Version: 1.0 Received: by 10.112.48.103 with SMTP id k7mr8211543lbn.88.1345585981143; Tue, 21 Aug 2012 14:53:01 -0700 (PDT) Received: by 10.112.89.174 with HTTP; Tue, 21 Aug 2012 14:53:00 -0700 (PDT) In-Reply-To: <5034017E.1020002@ajf.me> 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: Tue, 21 Aug 2012 15:53:00 -0600 Message-ID: To: Andrew Faulds Cc: Yasuo Ohgaki , 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: morrison.levi@gmail.com (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 . . .