[php-src] Issue #9587: Float handling changes since 8.0 - on purpose?
| From: | Guite | Date: | Wed, 21 Sep 2022 08:53:06 +0000 |
| Subject: | [php-src] Issue #9587: Float handling changes since 8.0 - on purpose? | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-242447@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/9587
Author: Guite
### Description
The following code:
```php
<?php
$a = 676.71;
$b = 108.05;
var_dump($a - $b);
```
Resulted in this output:
```
float(568.6600000000001)
```
But I expected this output instead:
```
float(568.66)
```

This BC break is not documented at https://www.php.net/manual/en/migration80.incompatible.php
Hence, I'd consider this a bug.
### PHP Version
PHP 8.*
### Operating System
any