original_string: public function checkIpIsV4OrV6($ipGiven)
      {
          if (filter_var($ipGiven, FILTER_VALIDATE_IP)) {
              if (filter_var($ipGiven, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {
                  return 'V4';
              } elseif (filter_var($ipGiven, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
                  return 'V6';
              }
          }
          return 'invalid IP';
      }
code: public function checkIpIsV4OrV6($ipGiven)
      {
          if (filter_var($ipGiven, FILTER_VALIDATE_IP)) {
              if (filter_var($ipGiven, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {
                  return 'V4';
              } elseif (filter_var($ipGiven, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
                  return 'V6';
              }
          }
          return 'invalid IP';
      }
code_tokens: public function checkIpIsV4OrV6 ( $ ipGiven ) { if ( filter_var ( $ ipGiven , FILTER_VALIDATE_IP ) ) { if ( filter_var ( $ ipGiven , FILTER_VALIDATE_IP , FILTER_FLAG_IPV4 ) ) { return 'V4' ; } elseif ( filter_var ( $ ipGiven , FILTER_VALIDATE_IP , FILTER_FLAG_IPV6 ) ) { return 'V6' ; } } return 'invalid IP' ; }
docstring: Checks if given IP is a V4 or V6
  
  @param ipv4 $ipGiven
  @return string
docstring_tokens: Checks if given IP is a V4 or V6