PHPackages                             wilaak/radix-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. wilaak/radix-router

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

wilaak/radix-router
===================

High-performance radix tree based HTTP request router

v3.6.7(4d ago)616.0k↑4116.7%2[2 issues](https://github.com/wilaak/radix-router/issues)4MITPHPPHP &gt;=8.0CI passing

Since Jul 12Pushed 3w agoCompare

[ Source](https://github.com/wilaak/radix-router)[ Packagist](https://packagist.org/packages/wilaak/radix-router)[ Docs](https://github.com/wilaak/radix-router)[ RSS](/packages/wilaak-radix-router/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (8)Versions (30)Used By (4)

[![RadixRouter](./assets/radx.svg)](./assets/radx.svg)
======================================================

[](#)

A simple HTTP router for PHP. Use it directly, or as a base for your own router (see [integrations](#integrations)).

- Path parameters: optional and wildcard (one per segment)
- API for listing routes/methods (useful for OPTIONS)
- Automatic 405 Method Not Allowed handling
- Zero dependencies and only 375 lines of code

See [benchmarks](#benchmarks) for how it compares to other routers.

Install
-------

[](#install)

```
composer require wilaak/radix-router
```

Requires PHP 8.0 or newer.

Usage
-----

[](#usage)

Below is an example to get you started using the PHP SAPI.

```
