PHP can't compare...

From: Date: Tue, 04 Dec 2001 22:02:19 +0000
Subject: PHP can't compare...
Groups: php.dev 
Request: Send a blank email to php-dev+get-72514@lists.php.net to get a copy of this message
Greetings, Explain to me why the first condition fails! <?php $fFloat1 = 3.55 + 60.12; $fFloat2 = 63.67; if ( $fFloat1 == $fFloat2 ) print "Equal"; else print "Not Equal"; settype($fFloat1, "string"); settype($fFloat1, "double"); if ( $fFloat1 == $fFloat2 ) print "Equal"; else print "Not Equal"; ?> Thanks, Matthew

« previous php.dev (#72514) next »