src/Money.php
public function subtract(Money $other)
    {
        $other = $other->convertToCurrency($this->currency);
        $this->assertSameCurrency($this, $other);

        $value = $this->amount - $other->getAmount();

        $this->assertIsFloat($value);

        return $this->newMoney($value);
    }
public function subtract(Money $other)
    {
        $other = $other->convertToCurrency($this->currency);
        $this->assertSameCurrency($this, $other);

        $value = $this->amount - $other->getAmount();

        $this->assertIsFloat($value);

        return $this->newMoney($value);
    }
public function subtract ( Money $ other ) { $ other = $ other -> convertToCurrency ( $ this -> currency ) ; $ this -> assertSameCurrency ( $ this , $ other ) ; $ value = $ this -> amount - $ other -> getAmount ( ) ; $ this -> assertIsFloat ( $ value ) ; return $ this -> newMoney ( $ value ) ; }
Returns a new Money object that represents the monetary value
of the difference of this Money object and another.

@param  Money $other
@return Money
@throws CurrencyMismatchException
@throws OverflowException
Returns a new Money object that represents the monetary value of the difference of this Money object and another .