<?php
$n="19.99";
print intval($n*100); // prints 1998
print intval(strval($n*100)); // prints 1999
?>
一些讨论
https://stackoverflow.com/questions/2497420/why-does-intval19-9-100-equal-1989/2497439
<?php
$n="19.99";
print intval($n*100); // prints 1998
print intval(strval($n*100)); // prints 1999
?>
一些讨论
https://stackoverflow.com/questions/2497420/why-does-intval19-9-100-equal-1989/2497439