Re: Breaking change of rounding behavior in PHP 8.4
| From: | Christoph M. Becker | Date: | Sat, 13 Jul 2024 13:30:39 +0000 |
| Subject: | Re: Breaking change of rounding behavior in PHP 8.4 | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-124419@lists.php.net to get a copy of this message | ||
Hi Saki!
On 13.07.2024 at 15:16, Saki Takamachi wrote:
>
>>> On 12.07.2024 at 17:26, Claude Pache wrote:
>>>
>>> See [1] and [2], which motivated the change.
>>
>> Ah, thank you! I probably should have checked this more thouroughly;
>> now even I can see that there was a *bug*, so it is okay for me to stick
>> with the fix (thank you, Saki!), […]
>>
>>> [1]:
>>> https://github.com/php/php-src/issues/12143#issuecomment-1713465981
>>> [2]: https://3v4l.org/3Q7BC
>
> If this can be considered a bug fix, then I'm in favor of keeping it as is. (I wasn't
> sure if this should be considered a feature addition.)
Well, if I call round() and tell it to round to zero decimals, and it
doesn't do it (assuming precision=-1), that looks like a bug to me.
> I will update UPGRADING with concrete examples.
Thank you!
Cheers,
Christoph