src/Money.php
public function subtract(Money ...$subtrahends)
    {
        $amount = $this->amount;
        $calculator = $this->getCalculator();

        foreach ($subtrahends as $subtrahend) {
            $this->assertSameCurrency($subtrahend);

            $amount = $calculator->subtract($amount, $subtrahend->amount);
        }

        return new self($amount, $this->currency);
    }
public function subtract(Money ...$subtrahends)
    {
        $amount = $this->amount;
        $calculator = $this->getCalculator();

        foreach ($subtrahends as $subtrahend) {
            $this->assertSameCurrency($subtrahend);

            $amount = $calculator->subtract($amount, $subtrahend->amount);
        }

        return new self($amount, $this->currency);
    }
public function subtract ( Money ... $ subtrahends ) { $ amount = $ this -> amount ; $ calculator = $ this -> getCalculator ( ) ; foreach ( $ subtrahends as $ subtrahend ) { $ this -> assertSameCurrency ( $ subtrahend ) ; $ amount = $ calculator -> subtract ( $ amount , $ subtrahend -> amount ) ; } return new self ( $ amount , $ this -> currency ) ; }
Returns a new Money object that represents
the difference of this and an other Money object.

@param Money[] $subtrahends

@return Money
Returns a new Money object that represents the difference of this and an other Money object .