PHPackages                             phpico/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. [Framework](/categories/framework)
4. /
5. phpico/router

ActiveLibrary[Framework](/categories/framework)

phpico/router
=============

Probably the smallest fully featured PHP Router for web applications ever built

1.0.0-RC2(10y ago)641MITPHPPHP &gt;=5.4.0

Since Apr 2Pushed 7y ago2 watchersCompare

[ Source](https://github.com/alrik11es/Router)[ Packagist](https://packagist.org/packages/phpico/router)[ RSS](/packages/phpico-router/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

Router
======

[](#router)

[![Join the chat at https://gitter.im/PHPico/Router](https://camo.githubusercontent.com/a6ba440d2e85de27aa3f1b689e55ac553c97b3cea7be81d889ac1381e97e6e36/68747470733a2f2f6261646765732e6769747465722e696d2f50485069636f2f526f757465722e737667)](https://gitter.im/PHPico/Router?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)[![Latest Version](https://camo.githubusercontent.com/8438435095f29bc09ed727ce671f3a56270b22acd928ce0ebacaa31cd9236d95/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f50485069636f2f526f757465722e7376673f7374796c653d666c61742d737175617265)](https://github.com/PHPico/Router/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/ef79391b64cd32e725db9aa10ce31ce90725ae5393d004c8cd9eca7fa343d51f/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f50485069636f2f526f757465722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/PHPico/Router)[![Coverage Status](https://camo.githubusercontent.com/93dcacfc2e9bb11595b7f358f6d2bd68853f601b41937c81cb118cc5fb41a2ee/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f50485069636f2f526f757465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/PHPico/Router/code-structure)[![Quality Score](https://camo.githubusercontent.com/cc86025b0de61108871795123c988eac364d80f90d20a8a52b7129076ebf6d0e/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f50485069636f2f526f757465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/PHPico/Router)[![Total Downloads](https://camo.githubusercontent.com/e3d9c6707220c9f2c0ce74ae160229f8a87140cea9e90ccfca7b6c5a5dd55797/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f50485069636f2f526f757465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/PHPico/Router)

The PHPico Router is probably the smallest fully featured PHP Router for web applications ever built.

It's intended for use with light applications. Even for embbeded uses like Raspberrypi.

**Disclaimer:** This class could be very useful for absolute noobs. You could learn A LOT just seeing this library code. Model View Controller is totally encouraged and is piece of cake if you know how to use this router. I promise, just one class, just a few lines (Less than 100).

Features
--------

[](#features)

- Very light
- Intended to be fast
- Manage GET, POST... types for your request
- REGEXP based
- Configuration as array
- Callbacks allowed

Example code
------------

[](#example-code)

The next example shows what you can do with this router.

```
