Last active
July 3, 2016 01:39
-
-
Save omerucel/6003467 to your computer and use it in GitHub Desktop.
Phalcon vs Slim, very basic test
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
ab -n 1000 -c 10 http://localhost/slim.php > slim.log | |
ab -n 1000 -c 10 http://localhost/phalcon.php > phalcon.log |
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 = new Phalcon\Mvc\Micro(); | |
$app->get( | |
'/{name}', | |
function ($name) use ($app) { | |
echo $name; | |
} | |
); | |
$app->handle($_SERVER['REQUEST_URI']); |
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 | |
$loader = require __DIR__ . '/../vendor/autoload.php'; | |
$app = new \Slim\Slim( | |
array( | |
'log.enabled' => false | |
) | |
); | |
$app->get( | |
'/:name', | |
function ($name) use ($app) { | |
echo $name; | |
} | |
); | |
$app->run(); |
maybe you need to calculate time spent for each run ;) ?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What results did you get?