public static function random($min, $max = null)
    {
        if ($max === null)
            list($min, $max) = [0, $min];

        return mt_rand($min, $max);
    }
public static function random($min, $max = null)
    {
        if ($max === null)
            list($min, $max) = [0, $min];

        return mt_rand($min, $max);
    }
public static function random ( $ min , $ max = null ) { if ( $ max === null ) list ( $ min , $ max ) = [ 0 , $ min ] ; return mt_rand ( $ min , $ max ) ; }
Returns a random integer between min and max, inclusive. If you only pass one argument, it will return a number
between 0 and that number.

@category Utility Functions

@param int $min the lower bound (or the max if $max is null, the min being 0 then)
@param int $max optional the upper bound

@return int
Returns a random integer between min and max inclusive . If you only pass one argument it will return a number between 0 and that number .