Uri
:earth_asia: Functions for making sense out of URIs in PHP
Install / Use
/learn @sabre-io/UriREADME
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% unit tested and many tests are based on examples from RFC3986.
The library provides the following functions:
resolveto resolve relative urls.normalizeto aid in comparing urls.parse, which works like PHP's parse_url with special cases for some Windows-style paths 9.buildto do the exact opposite ofparse.splitto easily get the 'dirname' and 'basename' of a URL without all the problems those two functions have.
Build status
| release | minimum PHP version | |---------|---------------------| | master | PHP 7.4 | | 3.0 | PHP 7.4 | | 2.3 | PHP 7.4 | | 2.2 | PHP 7.1 | | 2.0,2.1 | PHP 7.0 | | 1.x | 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.
Related Skills
node-connect
349.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
