PHPackages                             lazervel/url - 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. lazervel/url

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

lazervel/url
============

URL resolution and parsing meant to have feature parity with PHP core

v1.0.1(7mo ago)28115↓100%31MITPHPCI passing

Since Jul 23Pushed 7mo ago8 watchersCompare

[ Source](https://github.com/lazervel/url)[ Packagist](https://packagist.org/packages/lazervel/url)[ Docs](https://github.com/lazervel)[ Fund](https://github.com/indianmodassir)[ RSS](/packages/lazervel-url/feed)WikiDiscussions main Synced today

READMEChangelog (2)DependenciesVersions (3)Used By (1)

PHP URL
=======

[](#php-url)

> URL resolution and parsing meant to have feature parity with PHP core.
>
> [![](https://camo.githubusercontent.com/1ec4fad6766837b41ff936e927d9981bbfec3b1d6ea216749b5b863ee6e5c4fe/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f417574686f722d536861687a6164612532304d6f6461737369722d2532333434636331313f7374796c653d666c61742d737175617265)](https://github.com/shahzadamodassir)[![](https://camo.githubusercontent.com/c41adf520c0971afcfa3c6173e776e6da9643fbb8c0f996045ea5c5d6b2a9ccb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6c617a657276656c2f75726c3f7374796c653d666c61742d737175617265)](LICENSE)[![Total Downloads](https://camo.githubusercontent.com/c062dc13952ec0fcc64446e48ffc13d6439f19fe1e92179f99ef810f60bb2b55/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c617a657276656c2f75726c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lazervel/url)[![](https://camo.githubusercontent.com/1b75e77e926db1df2529023121502957c57234bb7d0f1dd773efeb1ff1f301a9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6c617a657276656c2f75726c3f7374796c653d666c61742d737175617265)](https://github.com/lazervel/url/stargazers)[![Latest Version](https://camo.githubusercontent.com/7d7d6f4516cb170cf5c9fb38f674b5e725e8ada66f385cf11b5c6a2fdd16ad0e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6c617a657276656c2f75726c2e7376673f7374796c653d666c61742d737175617265)](https://github.com/lazervel/url/releases)[![Contributors](https://camo.githubusercontent.com/550939056706ef378ebda29fa216445176dca833c712b40230f2a909d48644b6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f6c617a657276656c2f75726c3f7374796c653d666c61742d737175617265)](https://github.com/lazervel/url/graphs/contributors)[![Repository Size](https://camo.githubusercontent.com/038fe8ae8923dea6699e67dd31c07051ac982d91f8b4b3a5130a5c1e834a43bc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7265706f2d73697a652f6c617a657276656c2f75726c3f7374796c653d666c61742d737175617265)](/)

Composer Installation
---------------------

[](#composer-installation)

Installation is super-easy via [Composer](https://getcomposer.org)

```
composer require lazervel/url
```

or add it by hand to your `composer.json` file.

Usage
-----

[](#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
---------

[](#resources)

- [Report issue](https://github.com/lazervel/url/issues) and [send Pull Request](https://github.com/lazervel/url/pulls) in the [main Lazervel repository](https://github.com/lazervel/url)

###  Health Score

36

—

LowBetter than 83% of packages

Maintenance62

Regular maintenance activity

Popularity23

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 60% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

2

Last Release

239d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f450cf935f9bfadca6a1b355dff44fc62b535d389c62197422ecb858d7b04423?d=identicon)[indianmodassir](/maintainers/indianmodassir)

---

Top Contributors

[![indianmodassir](https://avatars.githubusercontent.com/u/152081666?v=4)](https://github.com/indianmodassir "indianmodassir (9 commits)")[![shahzada967](https://avatars.githubusercontent.com/u/226899880?v=4)](https://github.com/shahzada967 "shahzada967 (4 commits)")[![ngdadnf](https://avatars.githubusercontent.com/u/186187994?v=4)](https://github.com/ngdadnf "ngdadnf (1 commits)")[![sidraham](https://avatars.githubusercontent.com/u/185451793?v=4)](https://github.com/sidraham "sidraham (1 commits)")

---

Tags

urlphpparser

### Embed Badge

![Health badge](/badges/lazervel-url/health.svg)

```
[![Health](https://phpackages.com/badges/lazervel-url/health.svg)](https://phpackages.com/packages/lazervel-url)
```

###  Alternatives

[doctrine/lexer

PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.

11.2k896.2M98](/packages/doctrine-lexer)[simplehtmldom/simplehtmldom

A fast, simple and reliable HTML document parser for PHP.

1881.2M13](/packages/simplehtmldom-simplehtmldom)[vstelmakh/url-highlight

Library to parse urls from string input

102813.8k8](/packages/vstelmakh-url-highlight)[corveda/php-sandbox

A PHP library that can be used to run PHP code in a sandboxed environment

23680.6k2](/packages/corveda-php-sandbox)[romanpitak/nginx-config-processor

Nginx configuration files processor.

7235.1k1](/packages/romanpitak-nginx-config-processor)[sbsaga/toon

🧠 TOON for Laravel — a compact, human-readable, and token-efficient data format for AI prompts &amp; LLM contexts. Perfect for ChatGPT, Gemini, Claude, Mistral, and OpenAI integrations (JSON ⇄ TOON).

589.9k](/packages/sbsaga-toon)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
