Re: Breaking change of rounding behavior in PHP 8.4

From: Date: Sat, 13 Jul 2024 14:01:45 +0000
Subject: Re: Breaking change of rounding behavior in PHP 8.4
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-124420@lists.php.net to get a copy of this message
Hi Christoph, > 2024/07/13 22:30、Christoph M. Becker <cmbecker69@gmx.de>のメール: > > 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 I opened the PR. https://github.com/php/php-src/pull/14943 FYI, the test case for that value already exists :) https://github.com/php/php-src/blob/520787bb93990b95d9cf6eaf063ca2b03b76a87f/ext/standard/tests/math/round_gh12143_expand-rounding-target.phpt#L14 Regards, Saki

« previous php.internals (#124420) next »