A lightweight PHP library for RFC3986-compliant URI parsing, building, resolving, and normalizing.
sabre/uri is a PHP library that provides functions for parsing, building, resolving, and normalizing URIs according to the RFC3986 standard. It solves common problems when working with URIs in PHP applications, offering reliable utilities that handle edge cases like Windows-style paths.
PHP developers who need robust URI manipulation in web applications, APIs, or any system dealing with URL parsing and resolution.
Developers choose sabre/uri for its strict RFC3986 compliance, comprehensive test coverage, and reliable handling of special cases that PHP's built-in functions don't address properly.
:earth_asia: Functions for making sense out of URIs in PHP
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
All functions strictly adhere to the RFC3986 specification, with 100% unit test coverage based on official examples, ensuring correct handling of edge cases as highlighted in the README.
The resolve function accurately converts relative URLs to absolute URIs using a base URI, solving real-world problems in PHP applications, as mentioned in the library's value proposition.
Parse function improves upon PHP's parse_url by correctly handling Windows-style paths, addressing a known limitation, with details referenced in the README's pull request link.
With 100% unit tests and a clear release history supporting multiple PHP versions, the library is reliable and well-maintained, as evidenced by the build status and version table.
Usage and installation guides are hosted on an external website (sabre.io), which can be inconvenient and might lead to accessibility issues if the site is down or outdated.
Focused solely on RFC3986 URI manipulation, it lacks broader URL-related features like validation, encoding, or HTTP integration, requiring additional libraries for comprehensive web tasks.
Latest versions require PHP 7.4 or higher, which may force upgrades in legacy systems or limit adoption in environments with older PHP installations, as shown in the release table.