[php-src] Issue #13949: Using NumberFormatter::DECIMAL_ALWAYS_SHOWN adds the currency symbol to format() method output
| From: | ivanhoe011 | Date: | Fri, 12 Apr 2024 14:33:47 +0000 |
| Subject: | [php-src] Issue #13949: Using NumberFormatter::DECIMAL_ALWAYS_SHOWN adds the currency symbol to format() method output | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-246750@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/13949
Author: ivanhoe011
### Description
The following code:
```php
<?php
$formatter = new NumberFormatter('en_US', NumberFormatter::DECIMAL_ALWAYS_SHOWN);
var_dump($formatter->format(1234));
```
Resulted in this output:
```
string(9) "$1,234.00"
```
But I expected this output instead:
```
string(8) "1,234.00"
```
Note the currency symbol $ in front of the number which the format() method is not supposed to add
(as far as I could decipher the documentation).
Tested in versions 8.2.16 - 8.2.18, 8.3.0 - 8.3.6 on https://3v4l.org/RiejZ
### PHP Version
8.2.18 and 8.3.6
### Operating System
_No response_