original_string: public static function checkAndSanitize($field, $input, $flags = 0, array $options = null)
      {
          $checkedInput = self::check($field, $input, $options);
          if($checkedInput !== false)
              return $checkedInput;
  
          return self::sanitize($field,$input,$flags);
      }
code: public static function checkAndSanitize($field, $input, $flags = 0, array $options = null)
      {
          $checkedInput = self::check($field, $input, $options);
          if($checkedInput !== false)
              return $checkedInput;
  
          return self::sanitize($field,$input,$flags);
      }
code_tokens: public static function checkAndSanitize ( $ field , $ input , $ flags = 0 , array $ options = null ) { $ checkedInput = self :: check ( $ field , $ input , $ options ) ; if ( $ checkedInput !== false ) return $ checkedInput ; return self :: sanitize ( $ field , $ input , $ flags ) ; }
docstring: Checks the input and if it is not valid it tries to sanitize it.
  
  @param string $field all fields check and/or sanitize supports
  @param mixed  $input
  @param int    $flags   see `sanitize()` for details
  @param array  $options see `check()` for details
  @return mixed|false
docstring_tokens: Checks the input and if it is not valid it tries to sanitize it .