src/Num.php
public static function compare($num1, $num2)
    {
        if (!static::is($num1) || !static::is($num2)) {
            throw new \InvalidArgumentException("The \$num1 and \$num2 parameters must be numeric.");
        }

        return ($num1 - $num2);
    }
public static function compare($num1, $num2)
    {
        if (!static::is($num1) || !static::is($num2)) {
            throw new \InvalidArgumentException("The \$num1 and \$num2 parameters must be numeric.");
        }

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

The returning value contains the actual value difference.

@param int|float $num1 The left operand.
@param int|float $num2 The right operand.

@return int Returns <0 if $num1<$num2, =0 if $num1 == $num2, >0 if $num1>$num2
@throws \InvalidArgumentException
Compares two numeric values .