PHPackages                             pijush\_gupta/php-router - 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. pijush\_gupta/php-router

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

pijush\_gupta/php-router
========================

Simple Php Router

02PHP

Since Dec 29Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Pijushgupta/php-router)[ Packagist](https://packagist.org/packages/pijush_gupta/php-router)[ RSS](/packages/pijush-gupta-php-router/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

#### Php Router

[](#php-router)

###### Clone this repository

[](#clone-this-repository)

```
git clone https://github.com/Pijushgupta/php-router.git
```

###### Adding it to the project

[](#adding-it-to-the-project)

```
include_once 'Location of file';
```

###### OR use Composer/auto-loader

[](#or-use-composerauto-loader)

```
composer require pijush_gupta/php-router:dev-main
```

###### Using it in the project

[](#using-it-in-the-project)

```
use phpRouter\Router;
```

```
new Router('/', function () {
	echo 'Home';
});
```

###### Get method with Parameters

[](#get-method-with-parameters)

```
https://example.com?a=Pijush&b=Gupta

```

```
new Router('/',function($a,$b){ //exact number of variables and name as query vars from url.
	echo $a . $b;
})
```

###### Post method

[](#post-method)

```
https://example.com/

```

```
new Router('/',function($post){ //variable name for the param can be anything
	var_dump($post);
});
```

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity23

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/c74fdb54e7d0980abb730547ee47bf48a90ed2bb616b0fa66186d7672c9c7356?d=identicon)[Pijushgupta](/maintainers/Pijushgupta)

---

Top Contributors

[![Pijushgupta](https://avatars.githubusercontent.com/u/1472227?v=4)](https://github.com/Pijushgupta "Pijushgupta (16 commits)")

### Embed Badge

![Health badge](/badges/pijush-gupta-php-router/health.svg)

```
[![Health](https://phpackages.com/badges/pijush-gupta-php-router/health.svg)](https://phpackages.com/packages/pijush-gupta-php-router)
```

###  Alternatives

[alchemy/zippy

Zippy, the archive manager companion

47522.6M51](/packages/alchemy-zippy)[kotchuprik/php-short-id

Yet another Short ID generator. The library help you generate short id like youtube, vimeo, bit.ly, etc.

3054.4k](/packages/kotchuprik-php-short-id)[transprime-research/piper

PHP Pipe method execution with values from chained method executions

174.6k2](/packages/transprime-research-piper)

PHPackages © 2026

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