PHPackages                             sabre/uri - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. sabre/uri

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

sabre/uri
=========

Functions for making sense out of URIs.

3.0.2(1y ago)29335.2M↓10.7%20[3 issues](https://github.com/sabre-io/uri/issues)20BSD-3-ClausePHPPHP ^7.4 || ^8.0CI passing

Since Nov 18Pushed 3w ago19 watchersCompare

[ Source](https://github.com/sabre-io/uri)[ Packagist](https://packagist.org/packages/sabre/uri)[ Docs](http://sabre.io/uri/)[ RSS](/packages/sabre-uri/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (34)Used By (20)

sabre/uri
=========

[](#sabreuri)

sabre/uri is a lightweight library that provides several functions for working with URIs, staying true to the rules of [RFC3986](https://tools.ietf.org/html/rfc3986/).

Partially inspired by [Node.js URL library](http://nodejs.org/api/url.html), and created to solve real problems in PHP applications. 100% unit tested and many tests are based on examples from RFC3986.

The library provides the following functions:

1. `resolve` to resolve relative urls.
2. `normalize` to aid in comparing urls.
3. `parse`, which works like PHP's [parse\_url](http://php.net/manual/en/function.parse-url.php) with special cases for some Windows-style paths [9](https://github.com/sabre-io/uri/pull/71).
4. `build` to do the exact opposite of `parse`.
5. `split` to easily get the 'dirname' and 'basename' of a URL without all the problems those two functions have.

Build status
------------

[](#build-status)

[![Build Status](https://github.com/sabre-io/uri/actions/workflows/ci.yml/badge.svg)](https://github.com/sabre-io/uri/actions/workflows/ci.yml/badge.svg)

releaseminimum PHP versionmasterPHP 8.23.0PHP 7.42.3PHP 7.42.2PHP 7.12.0,2.1PHP 7.01.xPHP 5.4.7Further reading
---------------

[](#further-reading)

- [Installation](http://sabre.io/uri/install/)
- [Usage](http://sabre.io/uri/usage/)

Questions?
----------

[](#questions)

Head over to the [sabre/dav mailinglist](http://groups.google.com/group/sabredav-discuss), or you can also just open a ticket on [GitHub](https://github.com/fruux/sabre-uri/issues/).

Made at fruux
-------------

[](#made-at-fruux)

This library is being developed by [fruux](https://fruux.com/). Drop us a line for commercial services or enterprise support.

###  Health Score

67

—

FairBetter than 100% of packages

Maintenance68

Regular maintenance activity

Popularity68

Solid adoption and visibility

Community41

Growing community involvement

Maturity79

Established project with proven stability

 Bus Factor1

Top contributor holds 51.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~151 days

Recently: every ~237 days

Total

28

Last Release

125d ago

Major Versions

1.2.0 → 2.1.02016-12-07

1.2.1 → 2.1.12017-02-20

2.2.4 → 3.0.02022-09-26

2.3.3 → 3.0.12023-06-09

2.3.4 → 3.0.22024-09-04

PHP version history (5 changes)0.0.1PHP &gt;=5.4.7

2.0.0PHP &gt;=7

2.2.0PHP ^7.1

2.2.1PHP ^7.1 || ^8.0

2.3.0PHP ^7.4 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/2ec28c32d012f276f61b0b58cabe3c8f674166732d9b20eeddc3f9807857ba10?d=identicon)[evert](/maintainers/evert)

![](https://www.gravatar.com/avatar/d916220fea2bfe2d822214b0f188d1087035c66245431ae0dc2df4fbfbf81f6c?d=identicon)[dominik](/maintainers/dominik)

---

Top Contributors

[![phil-davis](https://avatars.githubusercontent.com/u/1535615?v=4)](https://github.com/phil-davis "phil-davis (162 commits)")[![evert](https://avatars.githubusercontent.com/u/178960?v=4)](https://github.com/evert "evert (111 commits)")[![DeepDiver1975](https://avatars.githubusercontent.com/u/1005065?v=4)](https://github.com/DeepDiver1975 "DeepDiver1975 (12 commits)")[![staabm](https://avatars.githubusercontent.com/u/120441?v=4)](https://github.com/staabm "staabm (10 commits)")[![ChristophWurst](https://avatars.githubusercontent.com/u/1374172?v=4)](https://github.com/ChristophWurst "ChristophWurst (7 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")[![dsazup](https://avatars.githubusercontent.com/u/8631224?v=4)](https://github.com/dsazup "dsazup (2 commits)")[![abhimanyu003](https://avatars.githubusercontent.com/u/265913?v=4)](https://github.com/abhimanyu003 "abhimanyu003 (1 commits)")[![vinkla](https://avatars.githubusercontent.com/u/499192?v=4)](https://github.com/vinkla "vinkla (1 commits)")[![BenMorel](https://avatars.githubusercontent.com/u/1952838?v=4)](https://github.com/BenMorel "BenMorel (1 commits)")[![cedric-anne](https://avatars.githubusercontent.com/u/33253653?v=4)](https://github.com/cedric-anne "cedric-anne (1 commits)")[![DominikTo](https://avatars.githubusercontent.com/u/1384635?v=4)](https://github.com/DominikTo "DominikTo (1 commits)")[![fr05t1k](https://avatars.githubusercontent.com/u/2131624?v=4)](https://github.com/fr05t1k "fr05t1k (1 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")[![peterpostmann](https://avatars.githubusercontent.com/u/9541377?v=4)](https://github.com/peterpostmann "peterpostmann (1 commits)")

---

Tags

phprfc3986sabreuriurlurlurirfc3986

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/sabre-uri/health.svg)

```
[![Health](https://phpackages.com/badges/sabre-uri/health.svg)](https://phpackages.com/packages/sabre-uri)
```

###  Alternatives

[league/uri-components

URI components manipulation library

31932.3M67](/packages/league-uri-components)[cybercog/laravel-optimus

An Optimus bridge for Laravel. Id obfuscation based on Knuth's multiplicative hashing method.

192564.1k](/packages/cybercog-laravel-optimus)[opis/uri

Build, parse and validate URIs and URI-templates

1920.8M6](/packages/opis-uri)[ml/iri

IRI handling for PHP

276.4M6](/packages/ml-iri)[rowbot/url

A WHATWG URL spec compliant URL parser for working with URLs and their query strings.

19648.2k4](/packages/rowbot-url)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
