lazervel/url
最新稳定版本:v1.0.1
Composer 安装命令:
composer require lazervel/url
包简介
URL resolution and parsing meant to have feature parity with PHP core
README 文档
README
URL resolution and parsing meant to have feature parity with PHP core.
Composer Installation
Installation is super-easy via Composer
composer require lazervel/url
or add it by hand to your composer.json file.
Usage
Url::parse('https://user:pass@www.example.com:5500/path/example.html?id=123&user=test#section'); // Results: // Lazervel\Url\Parser\Parser Object // ( // [hash] => #section // [search] => ?id=123&user=test // [query] => id=123&user=test // [slashes] => // // [auth] => user:pass // [protocol] => https: // [host] => www.example.com:5500 // [href] => https://user:pass@www.example.com:5500/path/example.html?id=123&user=test#section // [pathname] => /path/example.html // [port] => 5500 // [uri] => /path/example.html?id=123&user=test // [hostname] => example.com // [origin] => https://user:pass@www.example.com:5500 // [username] => user // [password] => pass // [www] => www. // ) new Url('path/example.html?id=123&user=test#section', 'https://user:pass@www.example.com:5500/'); // Results: Lazervel\Url\Url Object // ( // [hash] => #section // [password] => pass // [username] => user // [search] => ?id=123&user=test // [query] => id=123&user=test // [origin] => https://user:pass@www.example.com:5500 // [slashes] => // // [searchParams] => // [auth] => user:pass // [protocol] => https: // [www] => www. // [host] => www.example.com:5500 // [href] => https://user:pass@www.example.com:5500/path/example.html?id=123&user=test#section // [pathname] => /path/example.html // [port] => 5500 // [uri] => /path/example.html?id=123&user=test // [hostname] => example.com // )
Resources
统计信息
- 总下载量: 122
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 28
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-07-23