Skip to content

Instantly share code, notes, and snippets.

@tanner0101
Created June 13, 2016 02:47
Show Gist options
  • Save tanner0101/d5b6b4526ed26606c5c2e4c4e2f9bb06 to your computer and use it in GitHub Desktop.
Save tanner0101/d5b6b4526ed26606c5c2e4c4e2f9bb06 to your computer and use it in GitHub Desktop.
Lumen Benchmark
<?php
$app->get('/plaintext', function() {
return 'Hello, world!';
});
$app->get('/json', function() {
return [
'array' => [1, 2, 3],
'dict' => [
'one' => 1,
'two' => 2,
'three' => 3
],
'int' => 42,
'string' => 'test',
'double' => 3.14,
'null' => null
];
});
$app->get('/sqlite-fetch', function() {
return \DB::select('SELECT * FROM users ORDER BY random() LIMIT 1');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment