league/uri
League URI provides simple, intuitive PHP 8.1+ classes to parse, validate, normalize, and manipulate URIs and related components. Supports PSR-7 interoperability, IDN hosts (intl/polyfill), IPv4 conversion, and HTML URI handling.
The Uri package provides simple and intuitive classes to manage URIs in PHP.
⚠️ this is a sub-split, for development, pull requests and issues, visit: https://github.com/thephpleague/uri-src
You require PHP >= 8.1 but the latest stable version of PHP is recommended
Handling of an IDN host requires the presence of the intl
extension or a polyfill for the intl IDN functions like the
symfony/polyfill-intl-idn otherwise an exception will be thrown
when attempting to validate or interact with such a host.
IPv4 conversion requires at least one of the following:
GMP extension,BCMatch extension or64-bits PHP versionotherwise, an exception will be thrown when attempting to convert a host as an IPv4 address.
Parsing or generating HTML related content requires the dom extension.
$ composer require league/uri
Full documentation can be found at uri.thephpleague.com.
The MIT License (MIT). Please see License File for more information.
How can I help you explore Laravel packages today?