original_string: public static function isUri($value): bool
      {
          if (!static::isStringCastable($value)) {
              return false;
          }
  
          // http://tools.ietf.org/html/rfc3986
          //
          // URI         = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
          // hier-part   = "//" authority path-abempty
          //             / path-absolute
          //             / path-rootless
          //             / path-empty
          $pattern = sprintf(
              '/\A%s%s%s%s%s\z/',
              '(?:([^:\/?#]+)(:))?',
              '(?:(\/\/)([^\/?#]*))?',
              '([^?#]*)',
              '(?:(\?)([^#]*))?',
              '(?:(#)(.*))?'
          );
  
          preg_match($pattern, (string) $value, $matches);
          $uri = self::uriComponentsFromMatches($matches);
  
          return self::isValidUri($uri);
      }
code: public static function isUri($value): bool
      {
          if (!static::isStringCastable($value)) {
              return false;
          }
  
          // http://tools.ietf.org/html/rfc3986
          //
          // URI         = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
          // hier-part   = "//" authority path-abempty
          //             / path-absolute
          //             / path-rootless
          //             / path-empty
          $pattern = sprintf(
              '/\A%s%s%s%s%s\z/',
              '(?:([^:\/?#]+)(:))?',
              '(?:(\/\/)([^\/?#]*))?',
              '([^?#]*)',
              '(?:(\?)([^#]*))?',
              '(?:(#)(.*))?'
          );
  
          preg_match($pattern, (string) $value, $matches);
          $uri = self::uriComponentsFromMatches($matches);
  
          return self::isValidUri($uri);
      }
code_tokens: public static function isUri ( $ value ) : bool { if ( ! static :: isStringCastable ( $ value ) ) { return false ; } // http://tools.ietf.org/html/rfc3986 // // URI         = scheme ":" hier-part [ "?" query ] [ "#" fragment ] // hier-part   = "//" authority path-abempty //             / path-absolute //             / path-rootless //             / path-empty $ pattern = sprintf ( '/\A%s%s%s%s%s\z/' , '(?:([^:\/?#]+)(:))?' , '(?:(\/\/)([^\/?#]*))?' , '([^?#]*)' , '(?:(\?)([^#]*))?' , '(?:(#)(.*))?' ) ; preg_match ( $ pattern , ( string ) $ value , $ matches ) ; $ uri = self :: uriComponentsFromMatches ( $ matches ) ; return self :: isValidUri ( $ uri ) ; }
docstring: Checks if value is a URI
  
  @param mixed $value The value
  
  @return bool
docstring_tokens: Checks if value is a URI