[php-src] Issue #9542: Strange behavior of the comparison operator

From: Date: Wed, 14 Sep 2022 18:04:09 +0000
Subject: [php-src] Issue #9542: Strange behavior of the comparison operator
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-242417@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/9542 Author: nortar86 ### Description The following code: $a = 17.49; $b = 17.44; $c = $a - 0.05; echo $c; var_dump($b <= $c); var_dump($b == $c); $a = 17.50; $b = 17.44; $c = $a - 0.06; echo $c; var_dump($b <= $c); var_dump($b == $c); Resulted in this output: 17.44 bool(false) bool(false) 17.44 bool(true) bool(true) But I expected this output instead: 17.44 bool(true) bool(true) 17.44 bool(true) bool(true) ### PHP Version <=7.4 ### Operating System Ubuntu 20.04

« previous php.bugs (#242417) next »