Re: re: removing an item from an array

From: Date: Tue, 21 Aug 2012 19:00:59 +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  Groups: php.internals 
Request: Send a blank email to internals+get-62349@lists.php.net to get a copy of this message
On Tue, Aug 21, 2012 at 12:53 PM, Yasuo Ohgaki <yohgaki@ohgaki.net> wrote: > 2012/8/21 Levi Morrison <morrison.levi@gmail.com>: >> >> 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 >> t/Nã€÷æsÖ-Íœ� 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.

« previous php.internals (#62349) next »