Hi all, there has been a "small" change in the rounding logic of _php_math_round()[1] a couple of months ago. A respective ticket, claiming the new behavior would be a bug[2] had been filed a while ago without proper triage so far. I'm bringing this to your attention, because I'm afraid that there will be (many) more bug reports about this in the future (note that the change only affects master, and only PHP 8.4.0alpha1 has been released yet, so it is probably not widespreadly tested yet). At the very least we should be sure that we want to keep this change, and document it well, to avoid discussions in every filed ticket.
My personal stance on this is simple: floating point arithmetic is not exact per se, and changes to how PHP handles the details should only be introduced, if they clearly improve things. This change apparently improves some cases, but worsens others. Thus, I think the change should better be reverted, and if at all, postponed to PHP 9, since I neither regard this change as bug fix nor as a feature. What do you think? [1] <https://github.com/php/php-src/pull/12222> [2] <https://github.com/php/php-src/issues/14332> Cheers, Christoph