PHPackages                             evgsavosin/choco-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. [Caching](/categories/caching)
4. /
5. evgsavosin/choco-router

AbandonedArchivedLibrary[Caching](/categories/caching)

evgsavosin/choco-router
=======================

Modern router for PHP based on regex expression with cache system.

2.1.1(3y ago)13MITPHPPHP &gt;=8.1

Since Aug 28Pushed 3y ago1 watchersCompare

[ Source](https://github.com/evgsavosin/choco-router)[ Packagist](https://packagist.org/packages/evgsavosin/choco-router)[ RSS](/packages/evgsavosin-choco-router/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (1)Versions (7)Used By (0)

Choco Router
============

[](#choco-router)

[![PHPUnit Tests](https://github.com/evgsavosin/choco-router/actions/workflows/phpunit.yml/badge.svg)](https://github.com/evgsavosin/choco-router/actions/workflows/phpunit.yml)[![Stable](https://camo.githubusercontent.com/ebda102fb781d00800e24ffe76d20220445bed14e47a88b90e2d22f03608b528/68747470733a2f2f706f7365722e707567782e6f72672f6576677361766f73696e2f63686f636f2d726f757465722f762f737461626c652e737667)](https://packagist.org/packages/evgsavosin/choco-router)[![PHP](https://camo.githubusercontent.com/96bca81bbff836c3b6393edf7c91e3248847b9b8f0c53106b3f0777adf8d76a8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e312d3466356239332e7376673f6c6f676f3d676974687562)](https://img.shields.io/badge/php-8.1-4f5b93.svg?logo=github)[![License](https://camo.githubusercontent.com/58153d472c652a31a87648d1f1819b1003b164433d0f9db9c8cb10ebc2ef313a/68747470733a2f2f706f7365722e707567782e6f72672f6576677361766f73696e2f63686f636f2d726f757465722f6c6963656e73652e737667)](https://packagist.org/packages/evgsavosin/choco-router)

Modern router for PHP based on regex expression with cache system. Caching has driver support: file system, APCum, Memcached. Defining routes is possible both using methods and attributes from PHP 8.0.

Requirements
------------

[](#requirements)

- PHP 8.1 or newer;
- APCu (optional);
- Memcached (optional).

Install
-------

[](#install)

Install via composer:

```
composer require evgsavosin/choco-router
```

Usage
-----

[](#usage)

### Basic usage

[](#basic-usage)

To use it is necessary to define the call of classes using for example PSR-11 implementation.

```
