PHPackages                             smrtr/haltorouter - 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. smrtr/haltorouter

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

smrtr/haltorouter
=================

A lightning fast HTTP router for PHP

1.5(11y ago)41.3k[2 issues](https://github.com/smrtr/HaltoRouter/issues)1MITPHPPHP &gt;=5.3.0

Since Oct 2Pushed 9y ago2 watchersCompare

[ Source](https://github.com/smrtr/HaltoRouter)[ Packagist](https://packagist.org/packages/smrtr/haltorouter)[ Docs](https://github.com/smrtr/HaltoRouter)[ RSS](/packages/smrtr-haltorouter/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (3)Dependencies (1)Versions (7)Used By (1)

[HaltoRouter](http://resources.smrtr.co.uk/haltorouter/overview) [![build status](https://camo.githubusercontent.com/2bdd9105d2a81683ae9f829986ba47e83de3c52e1e81fd93fadca581d83f64c3/68747470733a2f2f7472617669732d63692e6f72672f736d7274722f48616c746f526f757465722e706e67)](https://camo.githubusercontent.com/2bdd9105d2a81683ae9f829986ba47e83de3c52e1e81fd93fadca581d83f64c3/68747470733a2f2f7472617669732d63692e6f72672f736d7274722f48616c746f526f757465722e706e67) [![Total Downloads](https://camo.githubusercontent.com/8a871cf55185712429612874f3288c164e282737c34c9108f92e709b4ea829f8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f736d7274722f48616c746f526f757465722e737667)](https://packagist.org/packages/smrtr/HaltoRouter)
=========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#haltorouter--)

HaltoRouter is a small but powerful routing class for PHP 5.3+. HaltoRouter is a hard fork of [AltoRouter](https://github.com/dannyvankooten/AltoRouter) with the basepath functionality stripped out and hostgroup functionality baked in.

- Dynamic routing with named parameters
- Reversed routing (url generation)
- Host matching via flexible hostgroups
- Flexible regular expression routing (inspired by [Sinatra](http://www.sinatrarb.com))

Tutorial
--------

[](#tutorial)

1. [Overview, installation &amp; getting started](http://resources.smrtr.co.uk/haltorouter/overview)
2. [Constructing routes](http://resources.smrtr.co.uk/haltorouter/constructing-routes)

- [Routes](http://resources.smrtr.co.uk/haltorouter/constructing-routes/routes)
- [Hostgroups](http://resources.smrtr.co.uk/haltorouter/constructing-routes/hostgroups)

3. [Handling requests](http://resources.smrtr.co.uk/haltorouter/handling-requests)
4. [Generating URLs](http://resources.smrtr.co.uk/haltorouter/generating-urls)

There are usage examples in the tests.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 90.5% 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 ~98 days

Recently: every ~122 days

Total

6

Last Release

4118d ago

### Community

Maintainers

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

---

Top Contributors

[![joegreen88](https://avatars.githubusercontent.com/u/1363420?v=4)](https://github.com/joegreen88 "joegreen88 (19 commits)")[![keugant](https://avatars.githubusercontent.com/u/1498189?v=4)](https://github.com/keugant "keugant (2 commits)")

---

Tags

routerroutinglightweighthostgroups

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/smrtr-haltorouter/health.svg)

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

###  Alternatives

[symfony/routing

Maps an HTTP request to a set of configuration variables

7.6k789.4M1.8k](/packages/symfony-routing)[nikic/fast-route

Fast request router for PHP

5.3k92.4M668](/packages/nikic-fast-route)[altorouter/altorouter

A lightning fast router for PHP

1.3k3.4M68](/packages/altorouter-altorouter)[aura/router

Powerful, flexible web routing for PSR-7 requests.

5231.5M67](/packages/aura-router)[aplus/routing

Aplus Framework Routing Library

2491.6M3](/packages/aplus-routing)[pmjones/auto-route

Automatically routes HTTP request to action classes.

20158.6k6](/packages/pmjones-auto-route)

PHPackages © 2026

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