PHPackages                             fallenangelbg/simpleurlparser - 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. fallenangelbg/simpleurlparser

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

fallenangelbg/simpleurlparser
=============================

Parse url to a PHP array. Build an URL to be parsed by using an array

10PHP

Since Mar 16Pushed 4y ago2 watchersCompare

[ Source](https://github.com/EdinUser/urlparser)[ Packagist](https://packagist.org/packages/fallenangelbg/simpleurlparser)[ RSS](/packages/fallenangelbg-simpleurlparser/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Simple URL Parser
=================

[](#simple-url-parser)

This is a simple URL parser, which returns an array of results from url of kind /module/controller/param1:value/param2:value,value

The parser also returns Breadcrumb array, if provided with a names for it (either hard coded or via DB/any other array.

Usage:
------

[](#usage)

### Parse an URL to array

[](#parse-an-url-to-array)

Example url:

```
use Fallenangelbg\SimpleUrlParser;

$getUrlDetails = (new SimpleUrlParser)->parseUrlForResults();
```

#### Result:

[](#result)

```
Array
(
    ['url'] => 'module/method1/param:1/param2:3,5,6/param3:test'
    ['bread'] => Array
        (
            ['Home'] => '/'
            ['module'] => 'module/'
            ['method1'] => 'method1/param:1/'
        )

    ['module'] => 'module'
    ['switch'] => 'method1'
    ['params'] => Array
        (
            ['param'] => 1
            ['param2'] => Array
                (
                    [0] => 3
                    [1] => 5
                    [2] => 6
                )

            ['param3'] => 'test'
        )

)
```

### Build URL from an array

[](#build-url-from-an-array)

```
use Fallenangelbg\SimpleUrlParser;

$arrayToBeBuild = array
(
    ['module'] => 'module'
    ['switch'] => 'method1'
    ['params']['param'] = 1;
    ['params']['param2'] = Array
                            (
                                [0] => 3
                                [1] => 5
                                [2] => 6
                            )

);
$getUrlDetails = (new SimpleUrlParser)->buildUrlByParams($arrayToBeBuild);
echo $getUrlDetails;
```

#### Result

[](#result-1)

```
/module/method1/param:1/param2:3,5,6
```

Use it if you like :)

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity26

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/9f2713e7500cb8a84d6363350b5c9a6f929a6a3df937ae4ac719440cefd9009c?d=identicon)[FallenAngelBG](/maintainers/FallenAngelBG)

---

Top Contributors

[![EdinUser](https://avatars.githubusercontent.com/u/5362622?v=4)](https://github.com/EdinUser "EdinUser (7 commits)")

### Embed Badge

![Health badge](/badges/fallenangelbg-simpleurlparser/health.svg)

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

###  Alternatives

[mtdowling/jmespath.php

Declaratively specify how to extract elements from a JSON document

2.0k472.8M135](/packages/mtdowling-jmespathphp)[opis/closure

A library that can be used to serialize closures (anonymous functions) and arbitrary data.

2.6k230.0M284](/packages/opis-closure)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)[michelf/php-markdown

PHP Markdown

3.5k52.4M345](/packages/michelf-php-markdown)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)

PHPackages © 2026

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