src/Money.php
public function compare(Money $other)
    {
        $this->assertSameCurrency($other);

        return $this->getCalculator()->compare($this->amount, $other->amount);
    }
public function compare(Money $other)
    {
        $this->assertSameCurrency($other);

        return $this->getCalculator()->compare($this->amount, $other->amount);
    }
public function compare ( Money $ other ) { $ this -> assertSameCurrency ( $ other ) ; return $ this -> getCalculator ( ) -> compare ( $ this -> amount , $ other -> amount ) ; }
Returns an integer less than, equal to, or greater than zero
if the value of this object is considered to be respectively
less than, equal to, or greater than the other.

@param Money $other

@return int
Returns an integer less than equal to or greater than zero if the value of this object is considered to be respectively less than equal to or greater than the other .