Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. PHP
  3. Uri

Uri

MITPHP7.8.1

A PHP library for parsing, validating, and manipulating URIs according to RFC standards.

Visit WebsiteGitHubGitHub
1.1k stars72 forks0 contributors

What is Uri?

League URI is a PHP library for parsing, validating, and manipulating Uniform Resource Identifiers (URIs). It provides RFC-compliant URI handling with immutable objects, solving the problem of inconsistent and error-prone URI manipulation in PHP applications. The library supports IDN domains, IPv4 addresses, and URI template expansion while maintaining strict standards compliance.

Target Audience

PHP developers building web applications, APIs, or any software that requires reliable URI parsing and manipulation. It's particularly valuable for projects needing RFC-compliant URI handling or PSR-7 compatibility.

Value Proposition

Developers choose League URI for its strict RFC compliance, immutable architecture that prevents side effects, and comprehensive feature set including IDN support and URI template expansion. It's more robust and standards-compliant than PHP's built-in URL functions.

Overview

[READ-ONLY] URI manipulation Library

Use Cases

Best For

  • Building REST APIs that need reliable URI parsing and validation
  • Web applications requiring RFC-compliant URI manipulation
  • PSR-7 compatible middleware and HTTP message handling
  • Projects needing Internationalized Domain Name (IDN) support
  • Generating dynamic URIs using RFC 6570 template expansion
  • Validating and sanitizing user-provided URLs in PHP applications

Not Ideal For

  • Projects running on PHP versions older than 8.1, as it strictly requires PHP 8.1+
  • Simple scripts that only need basic string manipulation for URLs without RFC compliance or validation
  • Environments lacking the intl or GMP/BCMath extensions, where IDN or IPv4 support is essential
  • Teams seeking a zero-dependency, lightweight library, due to its reliance on specific PHP extensions and PSR-7 interfaces

Pros & Cons

Pros

Strict RFC Compliance

Parses and validates URIs according to RFC 3986 and 3987 standards, ensuring accurate and reliable handling for web applications and APIs.

Immutable URI Objects

Uses immutable value objects to prevent unintended side effects during manipulation, enhancing security and predictability in complex applications.

IDN and IPv4 Support

Handles Internationalized Domain Names and IPv4 addresses with proper validation, though it requires the intl extension or a polyfill for full functionality.

PSR-7 Compatibility

Implements PSR-7 interfaces for seamless integration with modern PHP frameworks and HTTP message handling, as noted in the documentation.

Cons

Extension Dependencies

Requires specific PHP extensions like intl for IDN and GMP/BCMath for IPv4; missing extensions cause exceptions, adding deployment complexity.

PHP Version Limitation

Mandates PHP 8.1 or higher, which excludes legacy projects or environments not yet upgraded, as stated in the system requirements.

Setup Complexity

Full feature usage, such as IDN support or HTML parsing, depends on external extensions or polyfills, increasing initial setup effort and potential errors.

Frequently Asked Questions

Quick Stats

Stars1,126
Forks72
Contributors0
Open Issues0
Last commit1 month ago
CreatedSince 2015

Tags

#uri-parsing#rfc-6570#php-library#rfc-3986#url-manipulation#psr-7#uri#php#web-development#uri-template

Built With

C
Composer
P
PHP

Links & Resources

Website

Included in

PHP32.5k
Auto-fetched 16 hours ago

Related Projects

PHP Domain ParserPHP Domain Parser

Public Suffix List based domain parsing implemented in PHP

Stars1,231
Forks125
Last commit2 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub