Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62373 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 65558 invoked from network); 21 Aug 2012 22:21:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Aug 2012 22:21:16 -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:47644] helo=mail-we0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 39/0C-10139-CD904305 for ; Tue, 21 Aug 2012 18:21:16 -0400 Received: by weyr1 with SMTP id r1so224198wey.29 for ; Tue, 21 Aug 2012 15:21:13 -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=R29oqb2lj7AW+FnMkb0M+Q4OZ+4nzIiIgeBceH72jgQ=; b=xb87ulTMr6PAbJpy7CYnBexApI6N6Uis3MRhLOqj7EexKfBXk3STw+i3/jUXSut0ao XJcfB0qkEmYKIrCG8bFt697R6a63Cxz9/4TCeYxREy0wB7ukGNm4F9+U6ESRyXAdmz/t Gph8YEnw09H5oR9pzgDYsVdpbd5BYHZqoA9jtnt7m9jTWjj0JILF5lweyBpfq+eiMcQe bwCXORY7CkNkNv5aBI89tm1QgWBXkcE+zc7/SMDfltwmNEKDo4HNmlckR8KZtbs+cj15 n9pGZ8q7NDRvg9aICByGaOqwAo1eS8kFdZfah1r67yUmtxUjncZIRO9i9yHbPxtPA8Lg hWgA== Received: by 10.180.19.169 with SMTP id g9mr357974wie.9.1345587673264; Tue, 21 Aug 2012 15:21:13 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.223.86.201 with HTTP; Tue, 21 Aug 2012 15:20:32 -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:20:32 +0900 X-Google-Sender-Auth: I2HF_sklsJY-ODU1E5lFErTJw4I 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, 2012/8/22 Levi Morrison : > On Tue, Aug 21, 2012 at 4:13 PM, Yasuo Ohgaki wrote: >> 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(). >> > > Actually, array_udelete is far more similar to array_filter than it is > array_walk. . . Have you read my posts in this thread? Array filter CREATES new array instead of deleting elements. If one would like to DELETE element(s) by element value, array_walk is the way to go. I suppose I don't have to explain memory and execution efficiency here. Many people misunderstand the best practice. This is the reason why I think there should be array_udelete. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net