public static function filterInteger($int, $min=~PHP_INT_MAX, $max=PHP_INT_MAX, $default=0) {

        return filter_var($int, FILTER_VALIDATE_INT, array(
            'options' => array(
                'default' => $default,
                'min_range' => $min,
                'max_range' => $max
            )
        ));

    }
public static function filterInteger($int, $min=~PHP_INT_MAX, $max=PHP_INT_MAX, $default=0) {

        return filter_var($int, FILTER_VALIDATE_INT, array(
            'options' => array(
                'default' => $default,
                'min_range' => $min,
                'max_range' => $max
            )
        ));

    }
public static function filterInteger ( $ int , $ min = ~ PHP_INT_MAX , $ max = PHP_INT_MAX , $ default = 0 ) { return filter_var ( $ int , FILTER_VALIDATE_INT , array ( 'options' => array ( 'default' => $ default , 'min_range' => $ min , 'max_range' => $ max ) ) ) ; }
Filter an integer.

This method is a shortcut to filter_var using FILTER_VALIDATE_INT

@param int $int Int to filter
@param int $min Min value (default to ~PHP_INT_MAX)
@param int $max Max value (default to PHP_INT_MAX)
@param int $default Default value
@return int
Filter an integer .