PHPackages                             carlosocarvalho/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. [HTTP &amp; Networking](/categories/http)
4. /
5. carlosocarvalho/router

ActiveLibrary[HTTP &amp; Networking](/categories/http)

carlosocarvalho/router
======================

PHP router

1.0.0(10y ago)0211GPLPHP

Since May 26Pushed 10y ago1 watchersCompare

[ Source](https://github.com/carlosocarvalho/routers)[ Packagist](https://packagist.org/packages/carlosocarvalho/router)[ RSS](/packages/carlosocarvalho-router/feed)WikiDiscussions master Synced 1mo ago

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

routers
=======

[](#routers)

[![Latest Stable Version](https://camo.githubusercontent.com/739563fe7a0729d31ea4f893e9a6bc322c90b80ec7116bad35ce0a728832e5d1/68747470733a2f2f706f7365722e707567782e6f72672f6361726c6f736f63617276616c686f2f726f757465722f762f737461626c65)](https://packagist.org/packages/carlosocarvalho/router) [![Total Downloads](https://camo.githubusercontent.com/dec8d8ce94ed0e2f4a87153ad0a8cae4c7ac6ac7b5da3444688d39ac2f54e119/68747470733a2f2f706f7365722e707567782e6f72672f6361726c6f736f63617276616c686f2f726f757465722f646f776e6c6f616473)](https://packagist.org/packages/carlosocarvalho/router) [![Latest Unstable Version](https://camo.githubusercontent.com/9c1e2c4e34f79183f9f34c6a3ce6f2ab552a1d7259be5170394df05353cfd6be/68747470733a2f2f706f7365722e707567782e6f72672f6361726c6f736f63617276616c686f2f726f757465722f762f756e737461626c65)](https://packagist.org/packages/carlosocarvalho/router) [![License](https://camo.githubusercontent.com/675ea2d9bf520fa12bf1a4386d2927c72292ec47130c68dbba738557c9c54117/68747470733a2f2f706f7365722e707567782e6f72672f6361726c6f736f63617276616c686f2f726f757465722f6c6963656e7365)](https://packagist.org/packages/carlosocarvalho/router)

Simple Routers PHP
------------------

[](#simple-routers-php)

> Examples

get('/',function(){ echo 'home page'; }); $router-&gt;get('/posts/:id-:slug',function($id, $slug) use ($router){ echo $router-&gt;url('Blog#show',\['id'=&gt;1,'slug'=&gt;'slugsd-idads'\]); },'posts.show')-&gt;with('id','\[0-9\]+')-&gt;with('slug','(\[a-z\\-0-9\]+)'); $router-&gt;get('/posts/:id','Blog#show'); $router-&gt;post('/posts/:id',function($id){ print\_r($\_POST); }); $router-&gt;run(); ### Use Custom Controllers $router-&gt;get('/posts','Blog#show'); Create new Controller BlogController.php

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

4011d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5dc2e34302265b87bcbef211ffb061b589b7e56f699b9972abca7f5691e524d5?d=identicon)[carlosocarvalho](/maintainers/carlosocarvalho)

---

Top Contributors

[![carlosocarvalho](https://avatars.githubusercontent.com/u/1370878?v=4)](https://github.com/carlosocarvalho "carlosocarvalho (6 commits)")

### Embed Badge

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

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

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78026.4M414](/packages/react-http)[php-http/curl-client

PSR-18 and HTTPlug Async client with cURL

48347.0M384](/packages/php-http-curl-client)[smi2/phpclickhouse

PHP ClickHouse Client

84310.1M71](/packages/smi2-phpclickhouse)

PHPackages © 2026

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