Re: cvs: php-src /ext/standard array.c
| From: | Moriyoshi Koizumi | Date: | Wed, 18 Feb 2009 02:54:35 +0000 |
| Subject: | Re: cvs: php-src /ext/standard array.c | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-43085@lists.php.net to get a copy of this message | ||
In addition, we should look at similar comparison-involved array
functions such as array_intersect, array_diff and so on, otherwise
it's gonna be a mess.
Moriyoshi
On Wed, Feb 18, 2009 at 11:43 AM, Moriyoshi Koizumi <mozo@mozo.jp> wrote:
> On Wed, Feb 18, 2009 at 3:11 AM, Andrei Zmievski <andrei@gravitonic.com> wrote:
>
>> SORT_STRING can only reliably deal with strings - its behavior on non-string
>> type is basically broken. Unless we agree that PHP is Tcl (strings are the
>> only type), then SORT_REGULAR makes much more sense to me, and evidently
>> others.
>>
>> If you really have a huge problem with BC, perhaps we could leave the
>> default behavior as SORT_STRING for 5.2.x, but it definitely needs to be
>> SORT_REGULAR for 5.3/6.
>
> As I said earlier, the function is never supposed to be used with
> objects. Therefore, we cannot declare it to be broken, and any change
> to the behavior anyway leads to a huge BC break. I got a report that
> claims the reporter's real-world application behaves strangely with
> the latest release candidate.
>
> That said, I'm not really against making SORT_REGULAR default for
> later versions than 5.2.x as long as *appropriate notices* are
> provided, while I strongly disagree for 5.2.x.
>
> Moriyoshi
>
>>
>> -Andrei
>>
>