Re: Sorting Bug / Wrong behavior?
| From: | Marcus Boerger | Date: | Tue, 10 Aug 2004 18:48:18 +0000 |
| Subject: | Re: Sorting Bug / Wrong behavior? | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-12074@lists.php.net to get a copy of this message | ||
Hello Andrey,
Friday, July 30, 2004, 11:30:18 AM, you wrote:
> Andi Gutmans wrote:
>> I talked to John about this yesterday. I'll take a closer look at this
>> within the coming days to see if this makes sense and how it affects BC
>> in general (if at all).
>>
> Can you take a look also at
> http://bugs.php.net/bug.php?id=29421
We don't affect those. We simply correct the sorting to something
understandable when it comes to edge cases with zero. We don't touch
any other automatic typeconversion related behavior as mentioned in
that but.
php -r 'var_dump(array_search("baz",array("foo",TRUE
,"bar")));'
The above returns int(1) because
php -r 'var_dump((bool)"baz");'
returns bool(true).
Maybe we need a builtin search function that uses idetentity comparison?
regards
marcus