# nikic/FastRoute

Fast request router for PHP

Repository: https://github.com/nikic/FastRoute
Canonical: https://ross.abutalabs.com/products/fastroute
Language: PHP
License: NOASSERTION
License Family: other
Last push: 2026-07-09T19:39:51+00:00

## Health v2 (maintenance only)
Score: 64/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 91, release rhythm 8, longevity 100
- inputs: {"age_days": 4581, "days_push": 55, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5268, forks 449 (observed 2026-08-28T04:09:13.910511+00:00)

## What it is
FastRoute is a fast, regular expression-based HTTP request router library for PHP. It dispatches HTTP method and URI pairs to registered handlers using route patterns with typed placeholders.

## Use cases
- route http requests in a php application
- match urls with dynamic placeholders like /user/{id}
- build a custom php framework or microkernel
- handle 404 and 405 responses for unmatched routes
- define routes for multiple http methods
- speed up routing in a high-traffic php api

## When to choose
- you need a fast, standalone router for a PHP 8.1+ project
- you want regex-constrained route placeholders like {id:\d+}
- you are building your own framework or micro-framework and only need routing
- you need clear handling of NOT_FOUND and METHOD_NOT_ALLOWED dispatch results

## When to avoid
- you use a full framework (Laravel, Symfony) that already includes a router
- you need middleware, controllers, or other framework features beyond routing
- your project runs on PHP older than 8.1

## Facets
- artifact type: library
- maturity: stable
- function: routing, web-framework, http-server
- domain: web-development, backend, apis
- platform: php
- tags: http-router, regex-router, request-routing, composer

## Member repositories
- nikic/FastRoute (main) score 64

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:13.910511+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:59:29.018735+00:00, confidence not recorded.
  - readme: https://github.com/nikic/FastRoute (fetched 2026-08-28T04:09:13.910511+00:00, sha 7ab51a0b4b6c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
