From Slim: (http://www.slimframework.com/)
require 'Slim/Slim.php';
$app = new Slim();
$app->get('/hello/:name', function ($name) { echo "Hello, $name!"; });
$app->run();
From Silex: (http://silex.sensiolabs.org/)
require_once __DIR__.'/silex.phar';
$app = new Silex\Application();
$app->get('/hello/{name}', function($name) use($app) { return 'Hello '.$app->escape($name); });
From Slim: (http://www.slimframework.com/)
require 'Slim/Slim.php';
$app = new Slim();
$app->get('/hello/:name', function ($name) { echo "Hello, $name!"; });
$app->run();
From Silex: (http://silex.sensiolabs.org/)
require_once __DIR__.'/silex.phar';
$app = new Silex\Application();
$app->get('/hello/{name}', function($name) use($app) { return 'Hello '.$app->escape($name); });
$app->run();