[php-src] Issue #15964: sprintf %.17g negative infinty bug
| From: | divinity76 | Date: | Fri, 20 Sep 2024 12:34:42 +0000 |
| Subject: | [php-src] Issue #15964: sprintf %.17g negative infinty bug | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-247834@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/15964
Author: divinity76
### Description
The following code:
```php
<?php
var_dump(sprintf("%.17g", -INF));
```
Resulted in this output:
```
string(3) "INF"
```
But I expected this output instead:
```
string(4) "-INF"
```
### PHP Version
PHP 8.3.11
### Operating System
Ubuntu 24.04