Re: re: removing an item from an array
| From: | Peter Cowburn | Date: | Tue, 21 Aug 2012 22:43:35 +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-62376@lists.php.net to get a copy of this message | ||
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