网站首页 文章专栏 php中float转int的bug
PHP float精度有点问题,不要相信精度精确到了最后一位
$a=16.9;
$b=intval(round(floatval($a) * 100));
echo $b; #1690
转载请注明出处