PHPackages                             bypikod/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. bypikod/php-router

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

bypikod/php-router
==================

Simple router library with PHP

1.0.0(2y ago)05MITPHP

Since Nov 10Pushed 2y ago1 watchersCompare

[ Source](https://github.com/ByPikod/php-router)[ Packagist](https://packagist.org/packages/bypikod/php-router)[ Docs](https://github.com/ByPikod/php-router#readme)[ RSS](/packages/bypikod-php-router/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

PHP Router
==========

[](#php-router)

[![License](https://camo.githubusercontent.com/191ee550e064e59c8e8ace491e0bee5f3fc95b500f897ca86a1a3f60024a1749/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f427950696b6f642f7068702d726f757465722e7376673f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/191ee550e064e59c8e8ace491e0bee5f3fc95b500f897ca86a1a3f60024a1749/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f427950696b6f642f7068702d726f757465722e7376673f7374796c653d666f722d7468652d6261646765)[![Maintaned](https://camo.githubusercontent.com/8673e90d546a2c5ead6be528f7f7978f877d3f64205f10b19ad02e2d0d6726d0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d61696e7461696e65642533462d7965732d677265656e2e7376673f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/8673e90d546a2c5ead6be528f7f7978f877d3f64205f10b19ad02e2d0d6726d0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d61696e7461696e65642533462d7965732d677265656e2e7376673f7374796c653d666f722d7468652d6261646765)[![Commits](https://camo.githubusercontent.com/063563174a9dea6387ea0f8c57aabddc626f71ab1dcaf4b4d6fef452145300f6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6d6d6974732d73696e63652f427950696b6f642f7068702d726f757465722f6c61746573742e7376673f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/063563174a9dea6387ea0f8c57aabddc626f71ab1dcaf4b4d6fef452145300f6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6d6d6974732d73696e63652f427950696b6f642f7068702d726f757465722f6c61746573742e7376673f7374796c653d666f722d7468652d6261646765)[![Forks](https://camo.githubusercontent.com/714f77ee6df03615046d28a15661f19fefb56fbe6e142517ba6f224c4ae55daf/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f427950696b6f642f7068702d726f757465722e7376673f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/714f77ee6df03615046d28a15661f19fefb56fbe6e142517ba6f224c4ae55daf/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f427950696b6f642f7068702d726f757465722e7376673f7374796c653d666f722d7468652d6261646765)[![Stars](https://camo.githubusercontent.com/fd67dfaa0a4558cacd7dd8fa5d53aa5ad11c858851674ce5e38e7113ef97b97d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f427950696b6f642f7068702d726f757465722e7376673f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/fd67dfaa0a4558cacd7dd8fa5d53aa5ad11c858851674ce5e38e7113ef97b97d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f427950696b6f642f7068702d726f757465722e7376673f7374796c653d666f722d7468652d6261646765)[![Watchers](https://camo.githubusercontent.com/c43fbd5292fd28736b544a78ad1d30c13ac99f0d613e7c9a807866eb4fae8ef1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f77617463686572732f427950696b6f642f7068702d726f757465722e7376673f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/c43fbd5292fd28736b544a78ad1d30c13ac99f0d613e7c9a807866eb4fae8ef1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f77617463686572732f427950696b6f642f7068702d726f757465722e7376673f7374796c653d666f722d7468652d6261646765)

Simple PHP router library for routing.

Warning

Minimum PHP version for this package is PHP7.

Installation
------------

[](#installation)

Add this package to your project with composer:

```
composer require bypikod/php-router
```

Note

This project is designed to be used with Apache. You can find a sample ".htaccess" file [here](example.htaccess).

Getting Started
---------------

[](#getting-started)

```
use PHPRouter\Router;

$router = new Router();
$router->route('/', function () {
    echo "Hello World";
});

$router->run();
```

Contribute
----------

[](#contribute)

Contributers are welcome! Just make sure you understand the follow the rules below:

- Contributions must follow the [PSR-2](https://www.php-fig.org/psr/psr-2/) coding standard.
- Make sure you're writing documentation that covers your code changes.
- Follow the [Code of Conduct](CODE_OF_CONDUCT.md).

And you should know your submissions will be under [MIT License](LICENSE).

License
-------

[](#license)

This project is licensed under the terms of the MIT License.

You are free to use this project in compliance with the MIT License. If you decide to use, modify, or redistribute this software, you must include a copy of the original license and copyright notice in all copies or substantial portions of the software.

For more information about the MIT License, visit: [MIT License](https://www.mit.edu/~amini/LICENSE.md).

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

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

Unknown

Total

1

Last Release

912d ago

### Community

Maintainers

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

---

Top Contributors

[![ByPikod](https://avatars.githubusercontent.com/u/46069238?v=4)](https://github.com/ByPikod "ByPikod (10 commits)")

---

Tags

phpwebrouter

### Embed Badge

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

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

###  Alternatives

[nigelcunningham/puphpeteer

A Puppeteer bridge for PHP, supporting the entire API.

2221.7k](/packages/nigelcunningham-puphpeteer)[qinchen/web-utils

A web application common utils

111.4k](/packages/qinchen-web-utils)

PHPackages © 2026

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