PHPackages                             haukurh/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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. haukurh/uri

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

haukurh/uri
===========

PHP library to parse URI into it's components, based on RFC 3986

v1.0.0(6y ago)013MITPHPPHP ^7.1CI failing

Since Feb 12Pushed 6y ago1 watchersCompare

[ Source](https://github.com/haukurh/uri)[ Packagist](https://packagist.org/packages/haukurh/uri)[ RSS](/packages/haukurh-uri/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

haukurh/uri
===========

[](#haukurhuri)

PHP library to parse URI into it's components, based on RFC 3986

Description
-----------

[](#description)

The main idea of this library is to parse a URI into it's components. It does not validate the URI in any shape or form only parse the URI, given some basic rules based on RFC 3986.

For now it acts very much like `parse_url()` but does not change invalid characters in the URL, like some utf8 characters that may be a part of the path and/or query.

Some validation and more functionality may be implemented in the future.

Basic usage
-----------

[](#basic-usage)

Some basic getters have been made available to retrieve the desired component. The components are also available as public properties to read or write, but using the getters is encouraged because some business logic maybe applied to the selected URI component, like scheme to lowercase.

```
