[php-src] Issue #13866: number_format() changed undocumented behaviour since PHP 8.3.0

From: Date: Tue, 02 Apr 2024 09:10:06 +0000
Subject: [php-src] Issue #13866: number_format() changed undocumented behaviour since PHP 8.3.0
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-246695@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/13866 Author: langemeijer ### Description https://3v4l.org/ELBNR The following code: ```php <?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_

« previous php.bugs (#246695) next »