note 95624 deleted from language.types.float by cmb
| From: | cmb@php.net | Date: | Mon, 11 Jul 2016 22:05:21 +0000 |
| Subject: | note 95624 deleted from language.types.float by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-205972@lists.php.net to get a copy of this message | ||
Note Submitter: pgarvin76+phpmanual at gmail dot com
----
When converting from float to string trailing zeros will be dropped. Consider the following example.
Tested on PHP 5.3.1.
<?php
$a = 5.00500;
$b = 30.00;
echo "a = $a\n";
echo "b = $b\n";
/* outputs:
a = 5.005
b = 30
*/
?>