public function subtract($left, $right) {
        if (empty($left)) {
            return $right;
        } elseif (empty($right)) {
            return $left;
        } elseif ($right[0] == '-') {
            return $this->add($left, substr($right, 1));
        } elseif ($left[0] == '-') {
            return '-' . $this->add(ltrim($left, '-'), $right);
        }
        $left    = $this->normalize($left);
        $right   = $this->normalize($right);
        $results = $this->subtractBinary($left, $right);
        $result  = BaseConverter::convertFromBinary($results[1], '0123456789');
        return $results[0] . $result;
    }
public function subtract($left, $right) {
        if (empty($left)) {
            return $right;
        } elseif (empty($right)) {
            return $left;
        } elseif ($right[0] == '-') {
            return $this->add($left, substr($right, 1));
        } elseif ($left[0] == '-') {
            return '-' . $this->add(ltrim($left, '-'), $right);
        }
        $left    = $this->normalize($left);
        $right   = $this->normalize($right);
        $results = $this->subtractBinary($left, $right);
        $result  = BaseConverter::convertFromBinary($results[1], '0123456789');
        return $results[0] . $result;
    }
public function subtract ( $ left , $ right ) { if ( empty ( $ left ) ) { return $ right ; } elseif ( empty ( $ right ) ) { return $ left ; } elseif ( $ right [ 0 ] == '-' ) { return $ this -> add ( $ left , substr ( $ right , 1 ) ) ; } elseif ( $ left [ 0 ] == '-' ) { return '-' . $ this -> add ( ltrim ( $ left , '-' ) , $ right ) ; } $ left = $ this -> normalize ( $ left ) ; $ right = $ this -> normalize ( $ right ) ; $ results = $ this -> subtractBinary ( $ left , $ right ) ; $ result = BaseConverter :: convertFromBinary ( $ results [ 1 ] , '0123456789' ) ; return $ results [ 0 ] . $ result ; }
Subtract two numbers

@param string $left  The left argument
@param string $right The right argument

@return string A base-10 string of the difference of the two arguments
Subtract two numbers