I am in the process of upgrading our code from php 8.2 to 8.4
I noticed we are getting some test failures because of round() returning different values than expected. Ultimately the problem could be tracked down to rounding the result of certain multiplications giving different results in some cases than under 8.2. For example, round(365 * 0.7) now results in 255 whereas in 8.2 it results in 256.
You can see the difference here: https://3v4l.org/iT6T2#v8.4.14
In both versions, the result of 365 * 0.7 is apparently 255.49999999999997 so the issue must be down to the round().
I don't understand why this happens, can anyone enlighten me?