note 118704 added to function.round

From: Date: Thu, 21 Jan 2016 19:51:41 +0000
Subject: note 118704 added to function.round
Groups: php.notes 
Request: Send a blank email to php-notes+get-204743@lists.php.net to get a copy of this message
Can somebody explain me, why it behaves like this? <?php $a = (0.1 + 0.2) * 10; echo $a; // Output: "3" echo round($a); // Output: "3" echo round($a)==$a ? "true" : "false"; // Output: "false" // WHAT?! ?> ---- Server IP: 83.137.20.135 Probable Submitter: 62.219.136.168 ---- Manual Page -- http://php.net/manual/en/function.round.php Edit -- https://master.php.net/note/edit/118704 Del: integrated -- https://master.php.net/note/delete/118704/integrated Del: useless -- https://master.php.net/note/delete/118704/useless Del: bad code -- https://master.php.net/note/delete/118704/bad+code Del: spam -- https://master.php.net/note/delete/118704/spam Del: non-english -- https://master.php.net/note/delete/118704/non-english Del: in docs -- https://master.php.net/note/delete/118704/in+docs Del: other reasons-- https://master.php.net/note/delete/118704 Reject -- https://master.php.net/note/reject/118704 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#204743) next »