function currency_subtract in Currency 7.2
Subtracts one number from another.
Parameters
int|float|string $number_a: The number to subtract from.
int|float|string $number_b: The number to subtract.
Return value
int|float|string
File
- currency/
currency.module, line 1026 - Provides currency information and allows users to add custom currencies.
Code
function currency_subtract($number_a, $number_b) {
if (extension_loaded('bcmath')) {
return bcsub($number_a, $number_b, CURRENCY_BCMATH_SCALE);
}
else {
return $number_a - $number_b;
}
}