Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62375 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70156 invoked from network); 21 Aug 2012 22:37:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Aug 2012 22:37:13 -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:35325] helo=mail-lb0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8A/1D-10139-89D04305 for ; Tue, 21 Aug 2012 18:37:13 -0400 Received: by lbbgp3 with SMTP id gp3so301313lbb.29 for ; Tue, 21 Aug 2012 15:37:09 -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=cgZN1r9W8MkEBq0JwPgUjU7DU8L3wrEOTvDrDgkqImQ=; b=u/veGObS3LZX+U+25ue62HMadulYKHLWL4ujrpoTuT1hJYo/hjSlwBgnlYCZOE3WZb sKby56tmXVDJWeJW1VRNvtQcujI55qA6grmJqnz9Q86CB/bGa+hsjtopixjVqowck+9h yEyZvhS9LCvN26k/LyvpRmzg9TP3Ga5e9woImhl5MS+oKUsEyN0drXz3Jc3C7aQKW/yI hmeVnKO+6UakRf90l37kzOmWPyUyjRTsHw7dVxdP02g+J44H8XCSRnU0jhR29SuY8KML ZXsMvey6Y/UrPcmQCNhWHLk90AqD7jesz0X0fHeAzC7f4KmMFiL71ElIpY/vWMI0t8aq X8bw== MIME-Version: 1.0 Received: by 10.152.108.144 with SMTP id hk16mr18990240lab.2.1345588628966; Tue, 21 Aug 2012 15:37:08 -0700 (PDT) Received: by 10.112.89.174 with HTTP; Tue, 21 Aug 2012 15:37:08 -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: Tue, 21 Aug 2012 16:37:08 -0600 Message-ID: To: Yasuo Ohgaki 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: morrison.levi@gmail.com (Levi Morrison) > Why did you change the equivalent code? > array_walk is the best(fast and memory efficient) way > to delete elements. > > This code may be refereed from old PHP users, therefore > we should write better code. > > If you don' t have good reason to do so, please revert > the change. The implementation you had may be faster, but that is certainly NOT what matters as long as both are correct. What matters in the RFC is clarity. You have already said that too many people don't know about array_walk, so why would they understand array_delete in terms of array_walk? Please do not revert the change as what I have written is more clear. The reason speed doesn't matter in behavior example is that once it is implemented in C it will be just as fast as array_walk, perhaps it will even be faster.