[php-src] Issue #9331: Invalid Math calculation From PHP 8.0.0

From: Date: Sun, 14 Aug 2022 04:36:15 +0000
Subject: [php-src] Issue #9331: Invalid Math calculation From PHP 8.0.0
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-242214@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/9331 Author: hamedmoody ### Description Result of the following code correct in all php version except all PHP 8 versions ```php <?php $price = 1390000; $amount = 55; var_dump( $price - ( $price * ($amount / 100)) ); ``` Result in PHP version < 8.0.0: ``` float(625500) ``` Result in PHP version >= 8.0.0: ``` float(625499.9999999999) ``` ### PHP Version PHP 8.*.* ### Operating System _No response_

« previous php.bugs (#242214) next »