Created
June 13, 2016 02:47
-
-
Save tanner0101/d5b6b4526ed26606c5c2e4c4e2f9bb06 to your computer and use it in GitHub Desktop.
Lumen Benchmark
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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