Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62349 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21563 invoked from network); 21 Aug 2012 19:01:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Aug 2012 19:01:03 -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.215.42 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.215.42 mail-lpp01m010-f42.google.com Received: from [209.85.215.42] ([209.85.215.42:40876] helo=mail-lpp01m010-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4C/22-10139-EEAD3305 for ; Tue, 21 Aug 2012 15:01:03 -0400 Received: by lahl5 with SMTP id l5so91495lah.29 for ; Tue, 21 Aug 2012 12:00:59 -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=mXQmG5lrhfSiDvMtK5FnJdWWVOWecPxihgfHlRF0G/E=; b=XvhgPk38taAk0j6TFUETVFGgO1y0K7qKXNTn0HRBy4pYTFdF9k378cEOwcBereCt/d anFIjsx2Q42U/oS1VBZ+o9fWEnWAYeL5Xfa2Z5uEsiQpvA+TI+65FWlMgoKwEUzJvsxu 6hmG+dedmVzckaRsb7GKoqoFzgKMtBqGo72TB6i+eib2lS4JbGiuqdaOhwFI4FcvJlh3 YRxPrDCirfvs3gy9cLD76PiPOl3n6H5x3JxPfmvwLPL52tKc7164zfURNzkz4v72sax1 ui1UqMqgzKGgwSr7scwRN1iVVIpDP1Oq3N6/eJUN2l64OmF45IkUk0SPniTdWqon90tM Z4Gw== MIME-Version: 1.0 Received: by 10.112.103.68 with SMTP id fu4mr8156828lbb.56.1345575659367; Tue, 21 Aug 2012 12:00:59 -0700 (PDT) Received: by 10.112.89.174 with HTTP; Tue, 21 Aug 2012 12:00:59 -0700 (PDT) In-Reply-To: References: <502EB667.1020602@lerdorf.com> Date: Tue, 21 Aug 2012 13:00:59 -0600 Message-ID: To: Yasuo Ohgaki Cc: 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 12:53 PM, Yasuo Ohgaki wrote: > 2012/8/21 Levi Morrison : >> >> I'm against this RFC, but if you are going to even try to add >> something, please keep it consistent! Don't modify `array_delete` to >> take a callable, instead make a different function `array_udelete` or >> something. >> > > Original proposal is adding array_delete() and this is under discussion. > We don't have to add array_add() > >> And keep default $strict values consistent with existing functions >> that have that parameter. > > Users should use array_walk() when they would like to delete element(s). > To be consistent, it should be callable. > > Regards, > > -- > Yasuo Ohgaki > yohgaki@ohgaki.net I didn't say anything about `array_add`. I meant to say if you are going to try to add something to the core that you need to be consistent with the other array functions. Why use `array_walk` to delete elements? Isn't the whole point of `array_delete` to make that process easier? I think you missed the whole point of my last message: keep the functions you propose similar to ones that already exist.