Re: ksort breaking change

From: Date: Fri, 26 Aug 2022 13:01:07 +0000
Subject: Re: ksort breaking change
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-118509@lists.php.net to get a copy of this message
Am 26.08.2022 um 14:19 schrieb Christoph M. Becker <cmbecker69@gmx.de>: > On 26.08.2022 at 05:15, Go Kudo wrote: > >> In the actively supported version of PHP, ksort() has been >> modified to >> include BC Break. >> >> https://github.com/php/php-src/issues/9296 >> >> This may seem like an appropriate bug fix, but it is a clear BC Break. I >> think this change should only be introduced in PHP 8.2 and later. > > In this case, the functions didn't behave as documented, namely to > conform to the general conversion rules, which had a relevant change in > PHP 8.0. Apparently, this case has been overlooked when the change had > been implemented, and only been noticed recently (what still surprises > me). Anyway, fixing the issue now is not really introducing a BC break, > since code relying on the previous behavior did not conform to the > documentation. I don't really agree with your definition of BC break. The behavior of the function with a mix of numeric/non-numeric string keys changes from 8.1.9 to 8.1.10 which in my world qualifies as a BC break. Regards, - Chris

« previous php.internals (#118509) next »