Skip to content
🌏 Functions for making sense out of URIs in PHP
Branch: master
Clone or download
evert Merge pull request #42 from mirago/fix-41
Fix undefined port error in parse function, when the port was not found.
Latest commit 1381865 Jul 9, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib Fix undefined port error in parse function, when the port was not found. Jul 4, 2019
tests Fix styling Jul 4, 2019
.gitattributes Exclude files in production Mar 15, 2018
.gitignore Add php-cs-fixer config Oct 10, 2018
.php_cs.dist Add php-cs-fixer config Oct 10, 2018
.travis.yml
CHANGELOG.md 7.2 and 7.3 line Jun 25, 2019
LICENSE Update license year Jun 25, 2019
README.md Fixed build status Oct 10, 2017
composer.json We need 6, never mind Jun 25, 2019
phpstan.neon Fix phpstan level 7 Oct 21, 2018

README.md

sabre/uri

sabre/uri is a lightweight library that provides several functions for working with URIs, staying true to the rules of RFC3986.

Partially inspired by Node.js URL library, and created to solve real problems in PHP applications. 100% unitested 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.
  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

branch status minimum PHP version
master Build Status PHP 7.0
1.x Build Status PHP 5.4.7

Further reading

Questions?

Head over to the sabre/dav mailinglist, or you can also just open a ticket on GitHub.

Made at fruux

This library is being developed by fruux. Drop us a line for commercial services or enterprise support.

You can’t perform that action at this time.