$filter_options = array( 'options' => array( 'min_range' => 0) ); if( filter_var( $i, FILTER_VALIDATE_INT, $filter_options ) !== FALSE) { ... }