PHP 4.0 Bug #6019 Updated: Error with equal operator when comparing certain values

From: Date: Tue, 08 Aug 2000 13:25:26 +0000
Subject: PHP 4.0 Bug #6019 Updated: Error with equal operator when comparing certain values
Groups: php.dev 
Request: Send a blank email to php-dev+get-28093@lists.php.net to get a copy of this message
ID: 6019 Updated by: waldschrott Reported By: thomas@netropolis.dk Status: Analyzed Bug Type: Scripting Engine problem Assigned To: Comments: verified, replacing == with === in the third block will produce 0, what is correct for any reason the comparison is done corretly withing strings, I think you won´t have to switch to bcmaths functions for these tiny doubles, using var_dump() reveals that they´re correctly stored in $GLOABLS resumé: PHP performs return only 0,2,4 differences not 1,3,5 dealing with large numbers example: echo 9834567891230000-9834567891229999; // return2 s, should 1 echo 9834567891230000-9834567891230001; // returns 0, should -1 and so on Full Bug description available at: http://bugs.php.net/?id=6019

« previous php.dev (#28093) next »