How to use bcsub() to subtract one arbitrary precision number from another in PHP

1 Answer

0 votes
// string bcsub( string $left_operand , string $right_operand [, int $scale = 0 ] )

echo bcsub('6', '2.384') . "<br \>";
echo bcsub('6', '2.384', 4) . "<br \>";

 
/*
run: 

3.616
3.6160

*/

 



answered Jun 1, 2016 by avibootz
...