Re: re: removing an item from an array

From: Date: Tue, 21 Aug 2012 23:16:47 +0000
Subject: Re: re: removing an item from an array
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  Groups: php.internals 
Request: Send a blank email to internals+get-62379@lists.php.net to get a copy of this message
2012/8/22 Yasuo Ohgaki <yohgaki@ohgaki.net>: > Hi, > > 2012/8/22 Peter Cowburn <petercowburn@gmail.com>: >> On 21 August 2012 23:26, Yasuo Ohgaki <yohgaki@ohgaki.net> wrote: >>> array_walk is the best(fast and memory efficient) way >>> to delete elements. >> >> If array_walk() is the best (fast and memory efficient) way to delete >> elements, why have we had the following line in the manual, for the >> array_walk() callback, for over a decade [1]? (The exact phrasing has >> changed slightly one time, but the message has remained the same) >> "Only the values of the array may potentially be changed; its >> structure cannot be altered, i.e., the programmer cannot add, unset or >> reorder elements." >> >> [1] >> http://svn.php.net/viewvc/?view=revision&revision=75124 > > 10 years ago log :) > I'm not sure, but it had some problems with reference back then. > There were many array functions that behaved wrong with reference > used to be. > > I was annoyed by that, probably. That's why I wrote it, I suppose. > > Good catch. > It should be removed now. I thought it's in there now, but it's not. What's the point of bring up old bug documentation now? I really don't see. Regards, -- Yasuo Ohgaki

« previous php.internals (#62379) next »