src/IntMath.php
/**
     * Returns the negation of the argument.
     *
     * For integer values, negation is the same as subtraction from zero.
     * Because PHP uses two's-complement representation for integers and the
     * range of two's-complement values is not symmetric, the negation of the
     * maximum negative integer results in that same maximum negative number.
     * Despite the fact that overflow has occurred, no exception is thrown.
     *
     * For all integer values `$a`, `-$a` equals `(~$a) + 1`.
     *
     * @param integer $a The value.
     *
     * @return integer The result.
     *
     * @throws InvalidArgumentException If the argument is not an integer.
     */
Returns the negation of the argument.
For integer values, negation is the same as subtraction from zero.
Because PHP uses two's-complement representation for integers and the
range of two's-complement values is not symmetric, the negation of the
maximum negative integer results in that same maximum negative number.
Despite the fact that overflow has occurred, no exception is thrown.



@param integer $a The value.

@return integer The result.

@throws InvalidArgumentException If the argument is not an integer.
Returns the negation of the argument . For integer values negation is the same as subtraction from zero . Because PHP uses two ' s - complement representation for integers and the range of two ' s - complement values is not symmetric the negation of the maximum negative integer results in that same maximum negative number . Despite the fact that overflow has occurred no exception is thrown . @param integer $a The value . @return integer The result . @throws InvalidArgumentException If the argument is not an integer .
public static function negate($a)
    {
        self::assertInteger($a);
        if ($a === \PHP_INT_MIN) {
            return $a;
        }
        return -$a;
    }
public static function negate ( $ a ) { self :: assertInteger ( $ a ) ; if ( $ a === \ PHP_INT_MIN ) { return $ a ; } return - $ a ; }
Returns the negation of the argument.
Returns the negation of the argument .