| CARVIEW |
Select Language
HTTP/2 200
date: Sat, 27 Dec 2025 00:00:56 GMT
content-type: text/html; charset=utf-8
server: cloudflare
last-modified: Mon, 22 Dec 2025 16:07:44 GMT
access-control-allow-origin: *
expires: Sat, 27 Dec 2025 00:10:56 GMT
cache-control: max-age=600
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=rDukOXDaO2zH%2BwBwuVyQqRBX6BfpsbJM3yxcVgsu2S28O5GoGox0PGVuqtJ7XCbEIFox7%2Fac9fjaryA8pJrsudgeEGwBBpl1NZ%2F1X4fGe9bRbPts"}]}
x-proxy-cache: MISS
x-github-request-id: 0B93:2916CC:5D55FC:6831A7:694F21B6
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
age: 0
via: 1.1 varnish
x-served-by: cache-bom-vanm7210042-BOM
x-cache: MISS
x-cache-hits: 0
x-timer: S1766793656.962815,VS0,VE204
vary: Accept-Encoding
x-fastly-request-id: 0c236c73c127db8c950d524684d583555c001f53
cf-cache-status: DYNAMIC
content-encoding: gzip
cf-ray: 9b448a5ccb883a29-BOM
alt-svc: h3=":443"; ma=86400
Modern API to process URIs in PHP - The PHP URI Toolkit
The URI toolkit
URI toolkit
The URI toolkit
For PHP Developers
A complete PHP toolkit for working with URIs. Parse, validate, format, and manipulate any RFC 3986 or RFC 8141–compliant identifier in a consistent, standards-based way. Aligned with the WHATWG URL Living Standard. Includes polyfills, PSR-7 and PSR-17 adapters, and modern replacements for PHP’s legacy URL functions.
use League\Uri\Components\Query;
use League\Uri\Modifier;
use League\Uri\Uri;
$uri = Uri::new('https://example.com?q=value#fragment');
$uri->getScheme(); // returns 'http'
$uri->getHost(); // returns 'example.com'
$newUri = Modifier::wrap($uri)->appendQuery('q=new.Value');
echo $newUri; // 'https://example.com?q=value&q=new.Value#fragment'
$query = Query::fromUri($newUri);
$query->get('q'); // returns 'value'
$query->getAll('q'); // returns ['value', 'new.Value']
$query->parameter('q'); // returns 'new.Value'
Choose the package that suits your needs
uri-interfaces
The URI utility package
- URI parser and builder
- Query parser and builder
- IDNA, IPv4 and IPv6 converter
- Encoder/decoder for URI components
uri
The URI manipulation package
- Full validation of common URI schemes
- URN support following
RFC 8141 - URI Template expansion
RFC 6570 PSR-7andPSR-17URI adapters- Resolves, Normalizes and Relativizes URIs
uri-components
The URI components package
- Provides URI components objects
URLSearchParamsfor PHPFragmentDirectivesfor PHP- Universal URI Modifiers
uri-polyfill
The URI Polyfill package
Uri\Rfc3986\Urifor PHP8.1+Uri\WhatWg\Urlfor PHP8.1+
Love this toolkit? Sponsor its development
!
Once a new major version is released, the previous stable release remains supported for six more months with patches and security fixes.