3 ms·
Maybe a better comparison is from some of the microframeworks for PHP. As you can see, Sinatra influenced a lot of frameworks in many languages. From Slim: (ht
by justauser 15y ago
Maybe a better comparison is from some of the microframeworks for PHP. As you can see, Sinatra influenced a lot of frameworks in many languages.
From Slim: (http://www.slimframework.com/ 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/ 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();