Re: [RFC] [Discussion] Rounding Integers as int

From: Date: Thu, 05 Oct 2023 19:57:36 +0000
Subject: Re: [RFC] [Discussion] Rounding Integers as int
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-121240@lists.php.net to get a copy of this message
Hi On 10/4/23 08:35, Marc Bennewitz wrote:
As far as I understand you are in favor of option 1. (considering it a bugfix) but how do you make sure this will not lead to different application behavior overlooked on upgrading? Also there is no way to opt-in new behavior.
Yes, I would be in favor of option 1 and I don't even see a reason not to do this in PHP 8.4 right away. As I mentioned before, this effectively can be considered a bug fix: PHP does not correctly round integers > 2^53. While this is not a bug fix that is appropriate for the current stable branches, I don't see why it would not be appropriate for PHP 8.4 if there's an RFC for it. In fact there is already a rounding bugfix (no RFC for that) in PHP 8.4: https://github.com/php/php-src/blob/65a8c70f93ccb7e008de147cd4c357681c653bd0/UPGRADING#L75-L82 While PHP tries hard to keep backwards compatibility within a given major, keeping full compatibility is effectively impossible for the huge API surface PHP exposes. Every version includes *some* changes that are technically breaking for one reason or another. Best regards Tim Düsterhus

« previous php.internals (#121240) next »