number_format integer + overflow

php.internals

Marc

3 years ago
Hi internals, As commented in thread of "rounding integers" [1], I have opened a PR [2] for fully supporting formatting integers using "number_format" without any precision loss. Additionally, on working on it, I noticed a possible integer overflow on |$decimals |argument of the current function. As this is at least an internal API break I have opened a separate PR [3] as fix. I hope for these PR's no RFC is required as it does not break PHP API. Any objections? [1] https://externals.io/message/120373 [2] https://github.com/php/php-src/pull/11584 [3] https://github.com/php/php-src/pull/11649