On Tue, Aug 21, 2012 at 3:36 AM, Yasuo Ohgaki <yohg...@ohgaki.net> wrote:
> Hi
>
> 2012/8/21 Tjerk Anne Meesters <datib...@php.net>:
>> On Tue, Aug 21, 2012 at 10:31 AM, Rasmus Schultz <ras...@mindplay.dk> wrote:
>>
>>> Thank you, but this isn't really anything like what I had in mind.
>>>
>>> What I had in mind is more like set-semantics for arrays, e.g. designed to
>>> work with sets of distinct values/objects.
>>>
>>> Since I do not have permission to write on the wiki, I posted an initial
>>> draft here:
>>>
>>> https://gist.github.com/321ad9b4b8c4e1713488
>>
>>
>> Just an idea, since array_delete() may remove multiple values, I would
>> change the return value to (int) and return how many elements were removed
>> from the array.
>
> Int would be better and callable should be accepted like array_walk().
> It's better to have array_delete_recursive(), too.
> I updated the page.
>
> array_add() needs more discussion.
> What we should do with array value, accept callable or not, etc.
>
> Regards,
>
> --
> Yasuo Ohgaki
> yohg...@ohgaki.net
>

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` or
something.

And keep default $strict values consistent with existing functions
that have that parameter.

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to