note 115691 deleted from language.types.integer by cmb
| From: | cmb@php.net | Date: | Fri, 15 May 2015 18:58:04 +0000 |
| Subject: | note 115691 deleted from language.types.integer by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-202538@lists.php.net to get a copy of this message | ||
Note Submitter: Kalimuthu Aruchamy
----
<?php
echo "<br>".(int) ( (0.1+0.7) * 10 ); // echoes 7. Wrong. I think this is bug in
PHP. It works fine for below expressions
echo "<br>".(int) ( (0.2+0.7) * 10 ); // echoes 9. Right
echo "<br>".(int) ( (0.3+0.7) * 10 ); // echoes 10. Right
echo "<br>".(int) ( (0.4+0.7) * 10 ); // echoes 11. Right
?>