src/Int.php
public static function compare($int1, $int2)
    {
        if (!static::is($int1) || !static::is($int2)) {
            throw new \InvalidArgumentException("The \$int1 and \$int2 parameters must be of type int.");
        }

        return ($int1 - $int2);
    }
public static function compare($int1, $int2)
    {
        if (!static::is($int1) || !static::is($int2)) {
            throw new \InvalidArgumentException("The \$int1 and \$int2 parameters must be of type int.");
        }

        return ($int1 - $int2);
    }
public static function compare ( $ int1 , $ int2 ) { if ( ! static :: is ( $ int1 ) || ! static :: is ( $ int2 ) ) { throw new \ InvalidArgumentException ( "The \$int1 and \$int2 parameters must be of type int." ) ; } return ( $ int1 - $ int2 ) ; }
Compares two int values.

The returning value contains the actual value difference.

@param int $int1 The left operand.
@param int $int2 The right operand.

@return int Returns <0 if $int1<$int2, =0 if $int1 == $int2, >0 if $int1>$int2
@throws \InvalidArgumentException
Compares two int values .