On 5 January 2015 at 18:39, Xinchen Hui <larue...@php.net> wrote:
> On Tue, Jan 6, 2015 at 2:04 AM, Tim Düsterhus <t...@bastelstu.be> wrote:
>> On 05.01.2015 18:08, Xinchen Hui wrote:
>>>     do you think such BC break is acceptable? or I still need a RFC? :<
>>>
>>
>> Chiming in as a pure userland developer. The documentation already states:
>>
>>> Note: Like most PHP sorting functions, sort() uses an implementation
>> of » Quicksort. The pivot is chosen in the middle of the partition
>> resulting in an optimal time for already sorted arrays. This is however
>> an implementation detail you shouldn't rely on.
> thanks, then I think no problem.
>
> the reason why I asked is I found lots of test scripts starts to fail,
> they all rely on the current non-stable sorting algo :<

We make no promises about the implementation on any of the relevant
documentation pages, besides that it's a quick sort, and we explicitly
say that you can't rely on that. I think we can change this without a
real BC concern (although it would still be worth noting in UPGRADING
and, by extension, the migration guide).

Adam

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

Reply via email to