Closed
Description
Description
The following code:
<?php
echo number_format(3.1415, -1, ".", ",");
Resulted in this output since PHP 8.3.0:
0
But I expected this output instead:
3
No such change has been documented in https://www.php.net/manual/en/function.number-format.php
I understand -1 is not an expected value for $decimals, but if this change is intended I would have expected a E_WARNING or E_DEPRECATED before.
PHP Version
PHP 8.3.0
Operating System
No response