sabre / uri
Functions for making sense out of URIs.
Installs: 26 627 823
Dependents: 44
Suggesters: 0
Security: 0
Stars: 289
Watchers: 23
Forks: 19
Open Issues: 3
Requires
- php: ^7.4 || ^8.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.64
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^1.12
- phpstan/phpstan-phpunit: ^1.4
- phpstan/phpstan-strict-rules: ^1.6
- phpunit/phpunit: ^9.6
This package is auto-updated.
Last update: 2024-12-02 05:58:46 UTC
README
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% unit tested and many tests are based on examples from RFC3986.
The library provides the following functions:
resolve
to resolve relative urls.normalize
to aid in comparing urls.parse
, which works like PHP's parse_url with special cases for some Windows-style paths 9.build
to do the exact opposite ofparse
.split
to easily get the 'dirname' and 'basename' of a URL without all the problems those two functions have.
Build status
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.