PHPackages                             tkxel/klein-tkxel - 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. tkxel/klein-tkxel

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

tkxel/klein-tkxel
=================

A lightning fast router for PHP- PHP 8 Support

07PHP

Since Apr 15Pushed 4y ago2 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Klein.php
=========

[](#kleinphp)

[![Build Status](https://camo.githubusercontent.com/080cb8ab4d182c97bd5e51ffbfd25918a1d9db6ea33505e309d07b6bd29b1a67/68747470733a2f2f7472617669732d63692e6f72672f6b6c65696e2f6b6c65696e2e7068702e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/klein/klein.php)

**klein.php** is a fast &amp; flexible router for PHP 5.3+

- Flexible regular expression routing (inspired by [Sinatra](http://www.sinatrarb.com/))
- A set of [boilerplate methods](#api) for rapidly building web apps
- Almost no overhead =&gt; [2500+ requests/second](https://gist.github.com/878833)

Getting started
---------------

[](#getting-started)

1. PHP 5.3.x is required
2. Install Klein using [Composer](#composer-installation) (recommended) or manually
3. Setup [URL rewriting](https://gist.github.com/874000) so that all requests are handled by **index.php**
4. (Optional) Throw in some [APC](http://pecl.php.net/package/APC) for good measure

Composer Installation
---------------------

[](#composer-installation)

1. Get [Composer](http://getcomposer.org/)
2. Require Klein with `php composer.phar require klein/klein`
3. Add the following to your application's main PHP file: `require 'vendor/autoload.php';`

Example
-------

[](#example)

*Hello World* - Obligatory hello world example

```
