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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With