PHPackages                             gymadarasz/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. [HTTP &amp; Networking](/categories/http)
4. /
5. gymadarasz/router

ActiveLibrary[HTTP &amp; Networking](/categories/http)

gymadarasz/router
=================

v1.0.5(10y ago)135PHP

Since Dec 22Pushed 10y ago1 watchersCompare

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

READMEChangelog (5)DependenciesVersions (8)Used By (0)

Router
======

[](#router)

Fast and Simple Web Application Router Class

### Why would I use this over illuminate/routing or symfony/routing?

[](#why-would-i-use-this-over-illuminaterouting-or-symfonyrouting)

- Could you write a comparison?
- Speed! :) I like the laravel and symfony frameworks but the routing the first every single pageload, so my philosophy that routing have to be quick cause it just a simple regex matcher and this syntax easier for me. Anyway, here is a benchmark comparison e.g with FastRouter: ref: [\#1](https://github.com/gymadarasz/router/issues/1)

usage and examples
------------------

[](#usage-and-examples)

#### Install with composer:

[](#install-with-composer)

`composer require gymadarasz/router`

#### Add the code below to your `.htaccess` file for user and SEO friendly URLs:

[](#add-the-code-below-to-your-htaccess-file-for-user-and-seo-friendly-urls)

```
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

```

#### Add the code below to your `index.php`:

[](#add-the-code-below-to-your-indexphp)

```
