# FastRoute

> Fast request router for PHP

Source: https://talira.ai/catalog/fastroute-hhdkvja3
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / routing / server side](https://talira.ai/categories/libraries/routing/server-side), [languages / php](https://talira.ai/categories/languages/php)
- Licence: BSD-3-Clause[^1][^2]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [Nikita Popov](https://talira.ai/orgs/nikita-popov.md)

FastRoute is a request router for PHP by Nikita Popov: it matches an HTTP method and URI against routes such as `/user/{id:\d+}` and returns the handler with the route's variables, or a not found or method not allowed result with the methods that are allowed. Routes take placeholders with custom regular expressions, optional trailing parts, shortcut methods for each HTTP method and nested groups with a common prefix, and the compiled routes can be cached to a file or another cache driver. Its speed comes from combining the routes into a few large regular expressions, which its author's blog post explains. It isn't tied to PHP's web server interfaces: the app passes in the method and URI.

## Links

- GitHub: https://github.com/nikic/FastRoute

## Problems it solves

- match incoming URLs to handlers in a PHP app without a full framework
- a fast URL router for a PHP micro-framework of my own
- extract route parameters like /user/{id} from a request path in PHP

## Features

- route placeholders with custom regular expressions and optional trailing parts
- nested route groups with a shared prefix
- shortcut methods for GET, POST, PUT, PATCH, DELETE and HEAD
- cached route data through a file or another cache driver
- returns the allowed methods for a 405 Method Not Allowed response
- pluggable route parser and dispatcher

## Trust

Overall: 0.52 out of 1.
Signals: maintenance 0.61, adoption 0.74, momentum 0.47, community 0.69, backing 0.30, extensibility 0.00.

- last commit 10 days ago
- 2 commits in the last 90 days
- latest release 1.3.1 10 days ago
- 5.3k GitHub stars
- 53 contributors
- backed by Nikita Popov

## Sources

[^1]: https://github.com/nikic/FastRoute/blob/master/LICENSE (checked 28 Nov 2026)
[^2]: https://github.com/nikic/FastRoute/blob/master/composer.json (checked 28 Nov 2026)
