public static function subtract($amountA, $amountB)
    {
        $precision = (int)self::config()->get('precision');
        if (function_exists('bcsub') && self::config()->get('useBcMath')) {
            return bcsub($amountA, $amountB, $precision);
        }

        return self::formatFloat((double)$amountA - (double)$amountB, $precision);
    }
public static function subtract($amountA, $amountB)
    {
        $precision = (int)self::config()->get('precision');
        if (function_exists('bcsub') && self::config()->get('useBcMath')) {
            return bcsub($amountA, $amountB, $precision);
        }

        return self::formatFloat((double)$amountA - (double)$amountB, $precision);
    }
public static function subtract ( $ amountA , $ amountB ) { $ precision = ( int ) self :: config ( ) -> get ( 'precision' ) ; if ( function_exists ( 'bcsub' ) && self :: config ( ) -> get ( 'useBcMath' ) ) { return bcsub ( $ amountA , $ amountB , $ precision ) ; } return self :: formatFloat ( ( double ) $ amountA - ( double ) $ amountB , $ precision ) ; }
Subtract two numbers that are represented as a string.
Numbers will not be rounded but floored instead! So 10.0 - 0.1 with a precision of 0 will result in 9!
@param string $amountA first operand
@param string $amountB second operand
@return string the result as a string
Subtract two numbers that are represented as a string . Numbers will not be rounded but floored instead! So 10 . 0 - 0 . 1 with a precision of 0 will result in 9!