PHPackages                             djthossi/url-parser - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. djthossi/url-parser

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

djthossi/url-parser
===================

A small lean self written URL parser which parsed a given URL into a OOP version

1.2.0(6y ago)0101MITPHPPHP &gt;=7.2

Since May 6Pushed 6y ago1 watchersCompare

[ Source](https://github.com/DjThossi/url-parser)[ Packagist](https://packagist.org/packages/djthossi/url-parser)[ RSS](/packages/djthossi-url-parser/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

UrlParser
=========

[](#urlparser)

This URL parser works currenlty only for http and https. If you required // or other protocols, feel free to add them. [![Build Status](https://camo.githubusercontent.com/5b7ef61348779ca75d3e7fa25b5b5b3f1df59d64344adb8b58c2caf7219e0d2f/68747470733a2f2f7472617669732d63692e6f72672f446a54686f7373692f75726c2d7061727365722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/DjThossi/url-parser)[![Maintainability](https://camo.githubusercontent.com/be7c5ed9ab92d5843de1c021d31c339e6f9e8559e94e3ad8c31418062a61f46c/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f31653766666564373332383765626163333531342f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/DjThossi/url-parser/maintainability)[![Test Coverage](https://camo.githubusercontent.com/b0c083460b361fac291c5326d8eb31815837af9490c89df84718626c7cac7117/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f31653766666564373332383765626163333531342f746573745f636f766572616765)](https://codeclimate.com/github/DjThossi/url-parser/test_coverage)

How to install
--------------

[](#how-to-install)

You have several options to install this package

### Composer

[](#composer)

`composer require djthossi/url-parser`

### Git

[](#git)

`git clone https://github.com/DjThossi/url-parser.git`

### Download

[](#download)

`https://github.com/DjThossi/url-parser/archive/master.zip`

Example
-------

[](#example)

```
use DjThossi\UrlParser\ParsedUrl;
use DjThossi\UrlParser\UrlParser;

class SomeClass
{
    public function parseUrl(string $url): ParsedUrl
    {
        $urlParser = new UrlParser();
        return $urlParser->parseUrl($url);
    }
}
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~21 days

Total

3

Last Release

2524d ago

### Community

Maintainers

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

---

Top Contributors

[![DjThossi](https://avatars.githubusercontent.com/u/9482665?v=4)](https://github.com/DjThossi "DjThossi (15 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

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

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

###  Alternatives

[yaro/soc-share

Social network share link builder

101.9k](/packages/yaro-soc-share)

PHPackages © 2026

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