Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 604 Bytes

index.md

File metadata and controls

28 lines (20 loc) · 604 Bytes
layout title github_name
klein
Home
klein.php

klein.php is a lightning fast router for PHP 5.3+

  • Flexible regular expression routing (inspired by Sinatra)
  • A set of boilerplate methods for rapidly building web apps
  • Almost no overhead => 2500+ requests/second

Example

Hello World - Obligatory hello world example

<?php
require_once __DIR__ . '/vendor/autoload.php';

$klein = new \Klein\Klein();

$klein->respond('GET', '/hello-world', function () {
    return 'Hello World!';
});

$klein->dispatch();