Registry / networking / nikic-fast-route

nikic-fast-route

JSON →
library1.3.0phppackagistunverified

Fast request router for PHP

composer require nikic/fast-route
INSTALL
IMPORT
SIG · NIKIC-FAST-ROUTE
N
nikic-fast-route
networkingphpv1.3.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

RouteCollector
use FastRoute\RouteCollector;

Define and dispatch routes.

use FastRoute\RouteCollector; use FastRoute\simpleDispatcher; $dispatcher = simpleDispatcher(function(RouteCollector $r) { $r->addRoute('GET', '/users', 'get_users'); });
Debug
Known issues
gotchaRoute patterns use a custom syntax; not regex by default.
fix
Use {param} for placeholders, not regex unless using regex routes.
affects: >=1.0.0
Upgrade
Version history
1.3.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
nikic-fast-route — pip install nikic-fast-route · libregistry