Does PHP have Decimal(±1.0 × 10−28开发者_开发百科 to ±7.9 × 1028) data type?
The BC Math extension implements arbitrary-precision decimal math:
$a = '0.1';
$b = '0.2';
echo bcadd($a, $b); // prints 0.3
(From The Floating-Point Guide)
Does PHP have Decimal(±1.0 × 10−28开发者_开发百科 to ±7.9 × 1028) data type?
The BC Math extension implements arbitrary-precision decimal math:
$a = '0.1';
$b = '0.2';
echo bcadd($a, $b); // prints 0.3
(From The Floating-Point Guide)
上一篇:一米网线多少钱啊??
精彩评论