public static function validate_distance( $distance ) {
    $valid = filter_var( $distance, FILTER_VALIDATE_INT,
        array( 'options' => array(
            'min_range' => 1,
            'max_range' => PHP_INT_MAX
        ))
        );

    return false !== $valid ? true : false;
  }
public static function validate_distance( $distance ) {
    $valid = filter_var( $distance, FILTER_VALIDATE_INT,
        array( 'options' => array(
            'min_range' => 1,
            'max_range' => PHP_INT_MAX
        ))
        );

    return false !== $valid ? true : false;
  }
public static function validate_distance ( $ distance ) { $ valid = filter_var ( $ distance , FILTER_VALIDATE_INT , array ( 'options' => array ( 'min_range' => 1 , 'max_range' => PHP_INT_MAX ) ) ) ; return false !== $ valid ? true : false ; }
Validate distance.

Distance must be a positive integer.

@param string|integer $distance

@return boolean
Validate distance .