diff --git a/.docker/apache.dockerfile b/.docker/apache.dockerfile index ee847b3..ecf8838 100644 --- a/.docker/apache.dockerfile +++ b/.docker/apache.dockerfile @@ -1,4 +1,4 @@ -FROM php:8.3-apache +FROM php:8.4-apache RUN apt-get update \ && apt-get install -y libicu-dev diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6919d54..bade3de 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,11 +4,11 @@ on: [ push, pull_request ] jobs: setup: name: Check PHP frameworks - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install WRK run: sudo apt-get install wrk w3m @@ -16,15 +16,15 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.3 + php-version: 8.4 extensions: dom, curl, libxml, mbstring, zip, pcntl, ctype, iconv, intl coverage: none - name: Install Apache mod_php run: | LC_ALL=C.UTF-8 sudo apt-add-repository http://ppa.launchpad.net/ondrej/php/ubuntu - sudo apt install libapache2-mod-php8.3 - sudo a2enmod php8.3 rewrite + sudo apt install libapache2-mod-php8.4 + sudo a2enmod php8.4 rewrite shell: bash - name: Setup frameworks @@ -41,4 +41,4 @@ jobs: - name: Check frameworks run: bash check.sh - \ No newline at end of file + diff --git a/README.md b/README.md index b215ca1..2e0a287 100755 --- a/README.md +++ b/README.md @@ -33,18 +33,20 @@ Benchmarking on components like template engines or ORM/Database libraries is ou #### Environment -For `PHP 8.2` check out [this link](https://github.com/myaaghubi/PHP-Frameworks-Bench/tree/v2.3.1). +For `PHP 8.3` check out [this link](https://github.com/myaaghubi/PHP-Frameworks-Bench/tree/92cce05b3f6cf0aa33a06c3f13d8dd0c706f3b6c). -* Ubuntu 22.04 LTS x86_64 - * PHP 8.3.0 +For `PHP 8.2` check out [this link](https://github.com/myaaghubi/PHP-Frameworks-Bench/tree/163d2c0eb7862cf3c14479913435cb90ec7d6f0b). + +* Ubuntu 24.04 LTS x86_64 + * PHP 8.4.3 * OPCache Off - * Apache 2.4.52 + * Apache 2.4.58 * WRK 4.2.0 (5 min) * CPU Core i7-3770K/4.4Ghz * Memory 16G -#### Results (2023/12/1) +#### Results (2025/2/7) These are my benchmarks, not yours. **I encourage you to run on your -production equivalent- environments.** @@ -55,25 +57,23 @@ These are my benchmarks, not yours. **I encourage you to run on your -production |framework |requests per second (rps)|relative (rps)|peak memory|relative (mem)| |-------------------|------------------------:|-------------:|----------:|-------------:| -|pure-php | 27,077.31| 321.6| 0.42| 1.0| -|kumbia-1.1 | 5,921.29| 70.3| 0.54| 1.3| -|fastroute-1.3 | 4,516.12| 53.6| 0.56| 1.3| -|phroute-2.2 | 4,198.83| 49.9| 0.58| 1.4| -|leaf-3.5 | 1,487.36| 17.7| 1.11| 2.6| -|fatfree-3.8 | 1,453.82| 17.3| 1.72| 4.1| -|slim-4.12 | 798.17| 9.5| 1.57| 3.7| -|ubiquity-2.4.x.dev | 705.12| 8.4| 1.64| 3.9| -|silex-2.3 | 543.66| 6.5| 2.20| 5.2| -|yii-2.0-basic | 503.76| 6.0| 2.56| 6.1| -|fuelphp-1.9 | 429.18| 5.1| 2.61| 6.2| -|lumen-10.0 | 325.27| 3.9| 3.61| 8.6| -|symfony-5.4 | 309.74| 3.7| 3.77| 9.0| -|codeigniter-4.4 | 302.21| 3.6| 3.62| 8.6| -|symfony-7.0 | 286.46| 3.4| 4.07| 9.7| -|symfony-6.4 | 280.83| 3.3| 4.11| 9.8| -|cakephp-4.5 | 246.72| 2.9| 4.63| 11.0| -|cakephp-5.0 | 243.96| 2.9| 4.74| 11.3| -|laravel-10.2 | 84.19| 1.0| 13.06| 31.0| +|pure-php | 25,833.28| 409.4| 0.42| 1.0| +|kumbia-1.2 | 5,681.12| 90.0| 0.54| 1.3| +|fastroute-1.3 | 4,262.94| 67.6| 0.56| 1.3| +|phroute-2.2 | 3,949.48| 62.6| 0.58| 1.4| +|fatfree-3.9 | 1,364.24| 21.6| 1.72| 4.1| +|leaf-3.11 | 1,298.60| 20.6| 1.18| 2.8| +|slim-4.14 | 741.19| 11.7| 1.59| 3.8| +|yii-2.0-basic | 527.72| 8.4| 2.60| 6.2| +|silex-2.3 | 512.44| 8.1| 2.28| 5.4| +|lumen-10.0 | 301.01| 4.8| 3.78| 9.0| +|symfony-5.4 | 281.95| 4.5| 3.84| 9.1| +|codeigniter-4.6 | 274.93| 4.4| 3.93| 9.4| +|symfony-7.0 | 261.52| 4.1| 4.20| 10.0| +|symfony-6.4 | 254.35| 4.0| 4.26| 10.1| +|cakephp-5.1 | 222.48| 3.5| 4.96| 11.8| +|laravel-10.3 | 76.35| 1.2| 13.82| 32.9| +|laravel-11.0 | 63.10| 1.0| 16.19| 38.5| #### OPCache On @@ -246,4 +246,4 @@ Note: This project is based on You are allowed to use this plugin/project under the terms of the GNU General Public License version 2. -Copyright (C) 2024 [Mohammad Yaaghubi](https://github.com/myaaghubi) +Copyright (C) 2025 [Mohammad Yaaghubi](https://github.com/myaaghubi) diff --git a/base/hello_world.sh b/base/hello_world.sh index 439543c..203fbc8 100755 --- a/base/hello_world.sh +++ b/base/hello_world.sh @@ -22,10 +22,15 @@ phpc=`curl -s "$base/libs/php_config.php"` echo "/------- PHP Config -------/" echo "$phpc" +# Colors +GREEN='\033[0;32m' +RED='\033[0;31m' +NC='\033[0m' # No Color + for fw in `echo $param_targets` do + echo "\n/------- $fw -------/" if [ -d "$fw" ]; then - echo "\n/------- $fw -------/" # read -p "Continue to $fw (y/n)?" choice # case "$choice" in @@ -75,6 +80,10 @@ do # run the benchmark benchmark "$fw" "$url" + else + # check for dir + echo "${RED}Dir $fw/ doesn't exist!${NC}" + FAIL=1 fi done diff --git a/cakephp-4.5/_benchmark/cakephp/config/app_local.php b/cakephp-4.5/_benchmark/cakephp/config/app_local.php deleted file mode 100644 index f4ac0c8..0000000 --- a/cakephp-4.5/_benchmark/cakephp/config/app_local.php +++ /dev/null @@ -1,95 +0,0 @@ - false, - - /* - * Security and encryption configuration - * - * - salt - A random string used in security hashing methods. - * The salt value is also used as the encryption key. - * You should treat it as extremely sensitive data. - */ - 'Security' => [ - 'salt' => env('SECURITY_SALT', 'c68845eb71fab6866f7ee1177b2a0055c3ebc1995a4cb1116563e47fa64c9695'), - ], - - /* - * Connection information used by the ORM to connect - * to your application's datastores. - * - * See app.php for more configuration options. - */ - 'Datasources' => [ - 'default' => [ - 'host' => 'localhost', - /* - * CakePHP will use the default DB port based on the driver selected - * MySQL on MAMP uses port 8889, MAMP users will want to uncomment - * the following line and set the port accordingly - */ - //'port' => 'non_standard_port_number', - - 'username' => 'my_app', - 'password' => 'secret', - - 'database' => 'my_app', - /* - * If not using the default 'public' schema with the PostgreSQL driver - * set it here. - */ - //'schema' => 'myapp', - - /* - * You can use a DSN string to set the entire configuration - */ - 'url' => env('DATABASE_URL', null), - ], - - /* - * The test connection is used during the test suite. - */ - 'test' => [ - 'host' => 'localhost', - //'port' => 'non_standard_port_number', - 'username' => 'my_app', - 'password' => 'secret', - 'database' => 'test_myapp', - //'schema' => 'myapp', - 'url' => env('DATABASE_TEST_URL', 'sqlite://127.0.0.1/tests.sqlite'), - ], - ], - - /* - * Email configuration. - * - * Host and credential configuration in case you are using SmtpTransport - * - * See app.php for more configuration options. - */ - 'EmailTransport' => [ - 'default' => [ - 'host' => 'localhost', - 'port' => 25, - 'username' => null, - 'password' => null, - 'client' => null, - 'url' => env('EMAIL_TRANSPORT_DEFAULT_URL', null), - ], - ], -]; diff --git a/cakephp-4.5/_benchmark/cakephp/config/routes.php b/cakephp-4.5/_benchmark/cakephp/config/routes.php deleted file mode 100644 index a7b72f4..0000000 --- a/cakephp-4.5/_benchmark/cakephp/config/routes.php +++ /dev/null @@ -1,94 +0,0 @@ -setRouteClass(DashedRoute::class); - - /* *** PHP-Frameworks-Bench *** */ - $routes->connect('/hello/index', ['controller' => 'HelloWorld', 'action' => 'display', 'home']); - - $routes->scope('/', function (RouteBuilder $builder) { - /* - * Here, we are connecting '/' (base path) to a controller called 'Pages', - * its action called 'display', and we pass a param to select the view file - * to use (in this case, templates/Pages/home.php)... - */ - $builder->connect('/', ['controller' => 'Pages', 'action' => 'display', 'home']); - - /* - * ...and connect the rest of 'Pages' controller's URLs. - */ - $builder->connect('/pages/*', 'Pages::display'); - - /* - * Connect catchall routes for all controllers. - * - * The `fallbacks` method is a shortcut for - * - * ``` - * $builder->connect('/:controller', ['action' => 'index']); - * $builder->connect('/:controller/:action/*', []); - * ``` - * - * You can remove these routes once you've connected the - * routes you want in your application. - */ - $builder->fallbacks(); - }); - - /* - * If you need a different set of middleware or none at all, - * open new scope and define routes there. - * - * ``` - * $routes->scope('/api', function (RouteBuilder $builder) { - * // No $builder->applyMiddleware() here. - * - * // Parse specified extensions from URLs - * // $builder->setExtensions(['json', 'xml']); - * - * // Connect API actions here. - * }); - * ``` - */ -}; diff --git a/cakephp-4.5/_benchmark/cakephp/src/Controller/HelloWorldController.php b/cakephp-4.5/_benchmark/cakephp/src/Controller/HelloWorldController.php deleted file mode 100644 index a4cd4e1..0000000 --- a/cakephp-4.5/_benchmark/cakephp/src/Controller/HelloWorldController.php +++ /dev/null @@ -1,18 +0,0 @@ -response->withStringBody('Hello World!'); - } -} diff --git a/cakephp-4.5/_benchmark/cakephp/webroot/index.php b/cakephp-4.5/_benchmark/cakephp/webroot/index.php deleted file mode 100644 index 036a1c7..0000000 --- a/cakephp-4.5/_benchmark/cakephp/webroot/index.php +++ /dev/null @@ -1,43 +0,0 @@ -emit($server->run()); - -/* *** PHP-Frameworks-Bench *** */ -require $_SERVER['DOCUMENT_ROOT'].'/PHP-Frameworks-Bench/libs/output_data.php'; \ No newline at end of file diff --git a/cakephp-5.0/_benchmark/clear-cache.sh b/cakephp-5.0/_benchmark/clear-cache.sh deleted file mode 100755 index 623a6b9..0000000 --- a/cakephp-5.0/_benchmark/clear-cache.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -# clear cache -bin/cake cache clear_all -echo -e "done" \ No newline at end of file diff --git a/cakephp-5.0/_benchmark/hello_world.sh b/cakephp-5.0/_benchmark/hello_world.sh deleted file mode 100755 index 1e321c9..0000000 --- a/cakephp-5.0/_benchmark/hello_world.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -url="$base/$fw/webroot/index.php/hello/index" \ No newline at end of file diff --git a/cakephp-5.0/_benchmark/setup.sh b/cakephp-5.0/_benchmark/setup.sh deleted file mode 100755 index f85a2a5..0000000 --- a/cakephp-5.0/_benchmark/setup.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -# create project -rm -rf _benchmark/temp -composer create-project --prefer-dist cakephp/app:5.0.* ./_benchmark/temp --ansi -yes|mv ./_benchmark/temp/{.,}* ./ - -# have the route & controller -yes|cp -r _benchmark/cakephp/* ./ - -# some enhancements -composer dump-autoload -o -composer install --no-interaction --no-dev -o --ansi -rm ./webroot/.htaccess \ No newline at end of file diff --git a/cakephp-5.0/_benchmark/update.sh b/cakephp-5.0/_benchmark/update.sh deleted file mode 100755 index 1fdb0b3..0000000 --- a/cakephp-5.0/_benchmark/update.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -composer update - -# have the route & controller -yes|cp -r _benchmark/cakephp/* ./ - -# some enhancements -composer dump-autoload -o -composer install --no-interaction --no-dev -o -rm ./webroot/.htaccess \ No newline at end of file diff --git a/cakephp-5.0/_benchmark/cakephp/config/app_local.php b/cakephp-5.1/_benchmark/cakephp/config/app_local.php similarity index 100% rename from cakephp-5.0/_benchmark/cakephp/config/app_local.php rename to cakephp-5.1/_benchmark/cakephp/config/app_local.php diff --git a/cakephp-5.0/_benchmark/cakephp/config/routes.php b/cakephp-5.1/_benchmark/cakephp/config/routes.php similarity index 100% rename from cakephp-5.0/_benchmark/cakephp/config/routes.php rename to cakephp-5.1/_benchmark/cakephp/config/routes.php diff --git a/cakephp-5.0/_benchmark/cakephp/src/Controller/HelloWorldController.php b/cakephp-5.1/_benchmark/cakephp/src/Controller/HelloWorldController.php similarity index 100% rename from cakephp-5.0/_benchmark/cakephp/src/Controller/HelloWorldController.php rename to cakephp-5.1/_benchmark/cakephp/src/Controller/HelloWorldController.php diff --git a/cakephp-5.0/_benchmark/cakephp/webroot/index.php b/cakephp-5.1/_benchmark/cakephp/webroot/index.php similarity index 100% rename from cakephp-5.0/_benchmark/cakephp/webroot/index.php rename to cakephp-5.1/_benchmark/cakephp/webroot/index.php diff --git a/cakephp-4.5/_benchmark/clean.sh b/cakephp-5.1/_benchmark/clean.sh similarity index 100% rename from cakephp-4.5/_benchmark/clean.sh rename to cakephp-5.1/_benchmark/clean.sh diff --git a/cakephp-4.5/_benchmark/clear-cache.sh b/cakephp-5.1/_benchmark/clear-cache.sh old mode 100755 new mode 100644 similarity index 100% rename from cakephp-4.5/_benchmark/clear-cache.sh rename to cakephp-5.1/_benchmark/clear-cache.sh diff --git a/cakephp-4.5/_benchmark/hello_world.sh b/cakephp-5.1/_benchmark/hello_world.sh old mode 100755 new mode 100644 similarity index 100% rename from cakephp-4.5/_benchmark/hello_world.sh rename to cakephp-5.1/_benchmark/hello_world.sh diff --git a/cakephp-4.5/_benchmark/setup.sh b/cakephp-5.1/_benchmark/setup.sh old mode 100755 new mode 100644 similarity index 81% rename from cakephp-4.5/_benchmark/setup.sh rename to cakephp-5.1/_benchmark/setup.sh index c723eb2..00793e5 --- a/cakephp-4.5/_benchmark/setup.sh +++ b/cakephp-5.1/_benchmark/setup.sh @@ -1,7 +1,7 @@ #!/bin/sh # create project rm -rf _benchmark/temp -composer create-project --prefer-dist cakephp/app:4.5.* ./_benchmark/temp --ansi +composer create-project --prefer-dist cakephp/app:5.1.* ./_benchmark/temp --ansi yes|mv ./_benchmark/temp/{.,}* ./ # have the route & controller diff --git a/cakephp-4.5/_benchmark/update.sh b/cakephp-5.1/_benchmark/update.sh old mode 100755 new mode 100644 similarity index 100% rename from cakephp-4.5/_benchmark/update.sh rename to cakephp-5.1/_benchmark/update.sh diff --git a/check.sh b/check.sh index 7f80cb6..2534f1e 100755 --- a/check.sh +++ b/check.sh @@ -32,6 +32,10 @@ do else printf "%-34b %4s bytes %s\n" "${GREEN}✔ $fw ${NC}" "${#url_output}" "$url" fi + else + # if exist in config, but not exist the dir + echo -e "${RED}❌ Dir $fw ${NC} doesn't exist" + FAIL=1 fi done diff --git a/clean.sh b/clean.sh index 9066a1c..cab842f 100644 --- a/clean.sh +++ b/clean.sh @@ -3,14 +3,23 @@ . ./config . ./base/option_target.sh +# Colors +GREEN='\033[0;32m' +RED='\033[0;31m' +NC='\033[0m' # No Color + shopt -s extglob for fw in $param_targets do + echo "> cleaning $fw " if [ -d "$fw" ]; then - echo "> cleaning $fw " cd "$fw" . "_benchmark/clean.sh" cd .. + else + # check for dir + echo -e "${RED}Dir $fw/ doesn't exist!${NC}" + FAIL=1 fi done \ No newline at end of file diff --git a/clear-cache.sh b/clear-cache.sh index 58adc62..c3af3ed 100755 --- a/clear-cache.sh +++ b/clear-cache.sh @@ -9,14 +9,23 @@ fi . ./config . ./base/option_target.sh +# Colors +GREEN='\033[0;32m' +RED='\033[0;31m' +NC='\033[0m' # No Color + shopt -s extglob for fw in $param_targets do + echo -n "> clearing cache: $fw " if [ -d "$fw" ]; then - echo -n "> clearing cache: $fw " cd "$fw" . "_benchmark/clear-cache.sh" cd .. + else + # check for dir + echo -e "${RED}Dir $fw/ doesn't exist!${NC}" + FAIL=1 fi done \ No newline at end of file diff --git a/codeigniter-4.4/_benchmark/codeigniter/public/index.php b/codeigniter-4.4/_benchmark/codeigniter/public/index.php deleted file mode 100755 index efed459..0000000 --- a/codeigniter-4.4/_benchmark/codeigniter/public/index.php +++ /dev/null @@ -1,91 +0,0 @@ -systemDirectory, '\\/ ') . DIRECTORY_SEPARATOR . 'bootstrap.php'; - -// Load environment settings from .env files into $_SERVER and $_ENV -require_once SYSTEMPATH . 'Config/DotEnv.php'; -(new CodeIgniter\Config\DotEnv(ROOTPATH))->load(); - -// Define ENVIRONMENT -if (! defined('ENVIRONMENT')) { - define('ENVIRONMENT', env('CI_ENVIRONMENT', 'production')); -} - -// Load Config Cache -// $factoriesCache = new \CodeIgniter\Cache\FactoriesCache(); -// $factoriesCache->load('config'); -// ^^^ Uncomment these lines if you want to use Config Caching. - -/* - * --------------------------------------------------------------- - * GRAB OUR CODEIGNITER INSTANCE - * --------------------------------------------------------------- - * - * The CodeIgniter class contains the core functionality to make - * the application run, and does all the dirty work to get - * the pieces all working together. - */ - -$app = Config\Services::codeigniter(); -$app->initialize(); -$context = is_cli() ? 'php-cli' : 'web'; -$app->setContext($context); - -/* - *--------------------------------------------------------------- - * LAUNCH THE APPLICATION - *--------------------------------------------------------------- - * Now that everything is set up, it's time to actually fire - * up the engines and make this app do its thang. - */ - -$app->run(); - -// Save Config Cache -// $factoriesCache->save('config'); -// ^^^ Uncomment this line if you want to use Config Caching. - -// Exits the application, setting the exit code for CLI-based applications -// that might be watching. -// exit(EXIT_SUCCESS); - - -/* *** PHP-Frameworks-Bench *** */ -require $_SERVER['DOCUMENT_ROOT'].'/PHP-Frameworks-Bench/libs/output_data.php'; \ No newline at end of file diff --git a/cakephp-5.0/_benchmark/clean.sh b/codeigniter-4.6/_benchmark/clean.sh similarity index 100% rename from cakephp-5.0/_benchmark/clean.sh rename to codeigniter-4.6/_benchmark/clean.sh diff --git a/codeigniter-4.4/_benchmark/clear-cache.sh b/codeigniter-4.6/_benchmark/clear-cache.sh old mode 100755 new mode 100644 similarity index 100% rename from codeigniter-4.4/_benchmark/clear-cache.sh rename to codeigniter-4.6/_benchmark/clear-cache.sh diff --git a/codeigniter-4.4/_benchmark/codeigniter/app/Config/Routes.php b/codeigniter-4.6/_benchmark/codeigniter/app/Config/Routes.php old mode 100755 new mode 100644 similarity index 100% rename from codeigniter-4.4/_benchmark/codeigniter/app/Config/Routes.php rename to codeigniter-4.6/_benchmark/codeigniter/app/Config/Routes.php diff --git a/codeigniter-4.4/_benchmark/codeigniter/app/Controllers/HelloWorldController.php b/codeigniter-4.6/_benchmark/codeigniter/app/Controllers/HelloWorldController.php old mode 100755 new mode 100644 similarity index 100% rename from codeigniter-4.4/_benchmark/codeigniter/app/Controllers/HelloWorldController.php rename to codeigniter-4.6/_benchmark/codeigniter/app/Controllers/HelloWorldController.php diff --git a/codeigniter-4.6/_benchmark/codeigniter/public/index.php b/codeigniter-4.6/_benchmark/codeigniter/public/index.php new file mode 100644 index 0000000..c19d5b1 --- /dev/null +++ b/codeigniter-4.6/_benchmark/codeigniter/public/index.php @@ -0,0 +1,60 @@ +systemDirectory . '/Boot.php'; + +//exit(CodeIgniter\Boot::bootWeb($paths)); +CodeIgniter\Boot::bootWeb($paths); + +/* *** PHP-Frameworks-Bench *** */ +require $_SERVER['DOCUMENT_ROOT'].'/PHP-Frameworks-Bench/libs/output_data.php'; diff --git a/codeigniter-4.4/_benchmark/hello_world.sh b/codeigniter-4.6/_benchmark/hello_world.sh old mode 100755 new mode 100644 similarity index 100% rename from codeigniter-4.4/_benchmark/hello_world.sh rename to codeigniter-4.6/_benchmark/hello_world.sh diff --git a/codeigniter-4.4/_benchmark/setup.sh b/codeigniter-4.6/_benchmark/setup.sh old mode 100755 new mode 100644 similarity index 80% rename from codeigniter-4.4/_benchmark/setup.sh rename to codeigniter-4.6/_benchmark/setup.sh index 2e941e3..c8f382c --- a/codeigniter-4.4/_benchmark/setup.sh +++ b/codeigniter-4.6/_benchmark/setup.sh @@ -1,7 +1,7 @@ #!/bin/sh # create project rm -rf _benchmark/temp -composer create-project codeigniter4/appstarter:^4.4 --ansi --no-dev ./_benchmark/temp +composer create-project codeigniter4/appstarter:^4.6 --ansi --no-dev ./_benchmark/temp mv ./_benchmark/temp/{.,}* ./ # have the route & controller diff --git a/codeigniter-4.4/_benchmark/update.sh b/codeigniter-4.6/_benchmark/update.sh old mode 100755 new mode 100644 similarity index 100% rename from codeigniter-4.4/_benchmark/update.sh rename to codeigniter-4.6/_benchmark/update.sh diff --git a/config b/config index 5e56e37..d6dab72 100644 --- a/config +++ b/config @@ -16,23 +16,21 @@ connections=500 # Frameworks list # Sorted alphabetically frameworks_list=" -cakephp-4.5 -cakephp-5.0 -codeigniter-4.4 +cakephp-5.1 +codeigniter-4.6 fastroute-1.3 -fatfree-3.8 -fuelphp-1.9 -kumbia-1.1 -laravel-10.2 -leaf-3.5 +fatfree-3.9 +kumbia-1.2 +laravel-10.3 +laravel-11.0 +leaf-3.11 lumen-10.0 phroute-2.2 pure-php silex-2.3 -slim-4.12 +slim-4.14 symfony-5.4 symfony-6.4 symfony-7.0 -ubiquity-2.4.x.dev yii-2.0-basic " diff --git a/fatfree-3.8/Controllers/HelloWorldController.php b/fatfree-3.9/Controllers/HelloWorldController.php old mode 100755 new mode 100644 similarity index 100% rename from fatfree-3.8/Controllers/HelloWorldController.php rename to fatfree-3.9/Controllers/HelloWorldController.php diff --git a/fatfree-3.8/_benchmark/clean.sh b/fatfree-3.9/_benchmark/clean.sh similarity index 100% rename from fatfree-3.8/_benchmark/clean.sh rename to fatfree-3.9/_benchmark/clean.sh diff --git a/fatfree-3.8/_benchmark/clear-cache.sh b/fatfree-3.9/_benchmark/clear-cache.sh old mode 100755 new mode 100644 similarity index 100% rename from fatfree-3.8/_benchmark/clear-cache.sh rename to fatfree-3.9/_benchmark/clear-cache.sh diff --git a/fatfree-3.8/_benchmark/hello_world.sh b/fatfree-3.9/_benchmark/hello_world.sh similarity index 100% rename from fatfree-3.8/_benchmark/hello_world.sh rename to fatfree-3.9/_benchmark/hello_world.sh diff --git a/fatfree-3.8/_benchmark/setup.sh b/fatfree-3.9/_benchmark/setup.sh similarity index 100% rename from fatfree-3.8/_benchmark/setup.sh rename to fatfree-3.9/_benchmark/setup.sh diff --git a/fatfree-3.8/_benchmark/update.sh b/fatfree-3.9/_benchmark/update.sh similarity index 100% rename from fatfree-3.8/_benchmark/update.sh rename to fatfree-3.9/_benchmark/update.sh diff --git a/fatfree-3.8/composer.json b/fatfree-3.9/composer.json old mode 100755 new mode 100644 similarity index 76% rename from fatfree-3.8/composer.json rename to fatfree-3.9/composer.json index 2221ef5..61eedb3 --- a/fatfree-3.8/composer.json +++ b/fatfree-3.9/composer.json @@ -1,6 +1,6 @@ { "require": { - "bcosca/fatfree-core": "3.8.*" + "bcosca/fatfree-core": "3.9.*" }, "autoload": { "psr-4": { diff --git a/fatfree-3.8/public/index.php b/fatfree-3.9/public/index.php old mode 100755 new mode 100644 similarity index 100% rename from fatfree-3.8/public/index.php rename to fatfree-3.9/public/index.php diff --git a/fuelphp-1.9/_benchmark/clear-cache.sh b/fuelphp-1.9/_benchmark/clear-cache.sh deleted file mode 100755 index bf03122..0000000 --- a/fuelphp-1.9/_benchmark/clear-cache.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -# clear cache -rm -rf fuel/app/cache/* -echo -e "done" \ No newline at end of file diff --git a/fuelphp-1.9/_benchmark/fuel/fuel/app/classes/controller/helloworld.php b/fuelphp-1.9/_benchmark/fuel/fuel/app/classes/controller/helloworld.php deleted file mode 100644 index cf50f4e..0000000 --- a/fuelphp-1.9/_benchmark/fuel/fuel/app/classes/controller/helloworld.php +++ /dev/null @@ -1,10 +0,0 @@ - 'helloworld/index', - - /** - * ------------------------------------------------------------------------- - * Default route - * ------------------------------------------------------------------------- - * - */ - - '_root_' => 'welcome/index', - - /** - * ------------------------------------------------------------------------- - * Page not found - * ------------------------------------------------------------------------- - * - */ - - '_404_' => 'welcome/404', - - /** - * ------------------------------------------------------------------------- - * Example for Presenter - * ------------------------------------------------------------------------- - * - * A route for showing page using Presenter - * - */ - - 'hello(/:name)?' => array('welcome/hello', 'name' => 'hello'), -); diff --git a/fuelphp-1.9/_benchmark/fuel/fuel/app/logs/.gitkeep b/fuelphp-1.9/_benchmark/fuel/fuel/app/logs/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/fuelphp-1.9/_benchmark/fuel/public/index.php b/fuelphp-1.9/_benchmark/fuel/public/index.php deleted file mode 100644 index a992e22..0000000 --- a/fuelphp-1.9/_benchmark/fuel/public/index.php +++ /dev/null @@ -1,229 +0,0 @@ -translation : Config::get('routes.'.$request); - - if ($route instanceof Closure) - { - $response = $route(); - - if( ! $response instanceof Response) - { - $response = Response::forge($response); - } - } - elseif ($e === false) - { - $response = Request::forge()->execute()->response(); - } - elseif ($route) - { - $response = Request::forge($route, false)->execute(array($e))->response(); - } - elseif ($request) - { - $response = Request::forge($request)->execute(array($e))->response(); - } - else - { - throw $e; - } - - return $response; -}; - -/** - * ----------------------------------------------------------------------------- - * Starting the Application - * ----------------------------------------------------------------------------- - */ - -/** - * ----------------------------------------------------------------------------- - * Start the engine - * ----------------------------------------------------------------------------- - * - * Generate the request, execute it and send the output - * - */ - -try -{ - // Boot the app... - require APPPATH.'bootstrap.php'; - - // ... and execute the main request - $response = $routerequest(); -} -catch (HttpBadRequestException $e) -{ - $response = $routerequest('_400_', $e); -} -catch (HttpNoAccessException $e) -{ - $response = $routerequest('_403_', $e); -} -catch (HttpNotFoundException $e) -{ - $response = $routerequest('_404_', $e); -} -catch (HttpServerErrorException $e) -{ - $response = $routerequest('_500_', $e); -} - -$response->body((string) $response); - -/** - * ----------------------------------------------------------------------------- - * Start profiling - * ----------------------------------------------------------------------------- - * - * This will add the execution time and memory usage to the output. - * - * Comment these out if you don't use it. - * - */ - -if (strpos($response->body(), '{exec_time}') !== false or strpos($response->body(), '{mem_usage}') !== false) -{ - $bm = Profiler::app_total(); - - $response->body( - str_replace( - array('{exec_time}', '{mem_usage}'), - array(round($bm[0], 4), round($bm[1] / pow(1024, 2), 3)), - $response->body() - ) - ); -} - -/** - * ----------------------------------------------------------------------------- - * Show the web page - * ----------------------------------------------------------------------------- - * - * Send the output to the client - * - */ - -$response->send(true); - -/* *** PHP-Frameworks-Bench *** */ -require $_SERVER['DOCUMENT_ROOT'].'/PHP-Frameworks-Bench/libs/output_data.php'; \ No newline at end of file diff --git a/fuelphp-1.9/_benchmark/hello_world.sh b/fuelphp-1.9/_benchmark/hello_world.sh deleted file mode 100644 index 87247b6..0000000 --- a/fuelphp-1.9/_benchmark/hello_world.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -url="$base/$fw/public/index.php/helloworld/index" \ No newline at end of file diff --git a/fuelphp-1.9/_benchmark/setup.sh b/fuelphp-1.9/_benchmark/setup.sh deleted file mode 100755 index 9d79c14..0000000 --- a/fuelphp-1.9/_benchmark/setup.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -# create project -rm -rf _benchmark/temp -composer create-project fuel/fuel:^1.9.0 --prefer-dist ./_benchmark/temp --ansi -mv ./_benchmark/temp/{.,}* ./ - -# have the route & controller -yes|cp -r _benchmark/fuel/* ./ - -# some enhancements -composer config allow-plugins.composer/installers true -composer install --no-dev -o --ansi -rm ./public/.htaccess \ No newline at end of file diff --git a/fuelphp-1.9/_benchmark/update.sh b/fuelphp-1.9/_benchmark/update.sh deleted file mode 100755 index ef3bf2b..0000000 --- a/fuelphp-1.9/_benchmark/update.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -composer update - -# have the route & controller -yes|cp -r _benchmark/fuel/* ./ - -# some enhancements -composer config allow-plugins.composer/installers true -composer install --no-dev -o -rm ./public/.htaccess \ No newline at end of file diff --git a/kumbia-1.1/_benchmark/hello_world.sh b/kumbia-1.1/_benchmark/hello_world.sh deleted file mode 100755 index 740765e..0000000 --- a/kumbia-1.1/_benchmark/hello_world.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -url="$base/$fw/default/public/index.php/helloworld/index" diff --git a/kumbia-1.1/_benchmark/clean.sh b/kumbia-1.2/_benchmark/clean.sh similarity index 100% rename from kumbia-1.1/_benchmark/clean.sh rename to kumbia-1.2/_benchmark/clean.sh diff --git a/kumbia-1.1/_benchmark/clear-cache.sh b/kumbia-1.2/_benchmark/clear-cache.sh similarity index 100% rename from kumbia-1.1/_benchmark/clear-cache.sh rename to kumbia-1.2/_benchmark/clear-cache.sh diff --git a/kumbia-1.2/_benchmark/hello_world.sh b/kumbia-1.2/_benchmark/hello_world.sh new file mode 100755 index 0000000..1b36e15 --- /dev/null +++ b/kumbia-1.2/_benchmark/hello_world.sh @@ -0,0 +1,2 @@ +#!/bin/sh +url="$base/$fw/default/public/index.php/hello/index" diff --git a/kumbia-1.1/_benchmark/kumbia/default/app/controllers/helloworld_controller.php b/kumbia-1.2/_benchmark/kumbia/default/app/controllers/hello_controller.php similarity index 76% rename from kumbia-1.1/_benchmark/kumbia/default/app/controllers/helloworld_controller.php rename to kumbia-1.2/_benchmark/kumbia/default/app/controllers/hello_controller.php index 4616025..2037a78 100644 --- a/kumbia-1.1/_benchmark/kumbia/default/app/controllers/helloworld_controller.php +++ b/kumbia-1.2/_benchmark/kumbia/default/app/controllers/hello_controller.php @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/laravel-11.0/_benchmark/laravel/public/index.php b/laravel-11.0/_benchmark/laravel/public/index.php new file mode 100755 index 0000000..05b5758 --- /dev/null +++ b/laravel-11.0/_benchmark/laravel/public/index.php @@ -0,0 +1,21 @@ +handleRequest(Request::capture()); + + +/* *** PHP-Frameworks-Bench *** */ +require $_SERVER['DOCUMENT_ROOT'].'/PHP-Frameworks-Bench/libs/output_data.php'; \ No newline at end of file diff --git a/laravel-11.0/_benchmark/laravel/routes/web.php b/laravel-11.0/_benchmark/laravel/routes/web.php new file mode 100755 index 0000000..55ea02b --- /dev/null +++ b/laravel-11.0/_benchmark/laravel/routes/web.php @@ -0,0 +1,22 @@ +setBasePath("/PHP-Frameworks-Bench/slim-4.12/public/index.php"); +$app->setBasePath("/PHP-Frameworks-Bench/slim-4.13/public/index.php"); // Add error middleware $app->addErrorMiddleware(false, true, true); diff --git a/slim-4.14/Controllers/HelloWorldController.php b/slim-4.14/Controllers/HelloWorldController.php new file mode 100644 index 0000000..9046fdf --- /dev/null +++ b/slim-4.14/Controllers/HelloWorldController.php @@ -0,0 +1,19 @@ +getBody()->write("Hello World!"); + return $response; + } +} diff --git a/slim-4.14/_benchmark/clean.sh b/slim-4.14/_benchmark/clean.sh new file mode 100644 index 0000000..5d2acfa --- /dev/null +++ b/slim-4.14/_benchmark/clean.sh @@ -0,0 +1,3 @@ +#!/bin/sh +rm -rf !("_benchmark"|"Controllers"|"composer.json"|"public") +find -path './.*' -delete \ No newline at end of file diff --git a/ubiquity-2.4.x.dev/_benchmark/clear-cache.sh b/slim-4.14/_benchmark/clear-cache.sh old mode 100755 new mode 100644 similarity index 100% rename from ubiquity-2.4.x.dev/_benchmark/clear-cache.sh rename to slim-4.14/_benchmark/clear-cache.sh diff --git a/slim-4.14/_benchmark/hello_world.sh b/slim-4.14/_benchmark/hello_world.sh new file mode 100644 index 0000000..2d69368 --- /dev/null +++ b/slim-4.14/_benchmark/hello_world.sh @@ -0,0 +1,2 @@ +#!/bin/sh +url="$base/$fw/public/index.php/hello/index" \ No newline at end of file diff --git a/slim-4.14/_benchmark/setup.sh b/slim-4.14/_benchmark/setup.sh new file mode 100644 index 0000000..993fa08 --- /dev/null +++ b/slim-4.14/_benchmark/setup.sh @@ -0,0 +1,2 @@ +#!/bin/sh +composer install --no-dev -o --ansi \ No newline at end of file diff --git a/slim-4.14/_benchmark/update.sh b/slim-4.14/_benchmark/update.sh new file mode 100644 index 0000000..98986ff --- /dev/null +++ b/slim-4.14/_benchmark/update.sh @@ -0,0 +1,2 @@ +#!/bin/sh +composer update \ No newline at end of file diff --git a/slim-4.14/composer.json b/slim-4.14/composer.json new file mode 100644 index 0000000..cbfacd1 --- /dev/null +++ b/slim-4.14/composer.json @@ -0,0 +1,12 @@ +{ + "require": { + "slim/slim": "4.14.*", + "slim/psr7": "1.7.*", + "slim/http": "1.4.*" + }, + "autoload": { + "psr-4": { + "Controllers\\": "Controllers/" + } + } +} diff --git a/slim-4.14/public/index.php b/slim-4.14/public/index.php new file mode 100644 index 0000000..6ecf0a9 --- /dev/null +++ b/slim-4.14/public/index.php @@ -0,0 +1,22 @@ +setBasePath("/PHP-Frameworks-Bench/slim-4.14/public/index.php"); + +// Add error middleware +$app->addErrorMiddleware(false, true, true); + +/* *** PHP-Frameworks-Bench *** */ +$app->get('/hello/index', Controllers\HelloWorldController::class . ':index'); + +$app->run(); + + +/* *** PHP-Frameworks-Bench *** */ +require $_SERVER['DOCUMENT_ROOT'].'/PHP-Frameworks-Bench/libs/output_data.php'; diff --git a/ubiquity-2.4.x.dev/_benchmark/clean.sh b/ubiquity-2.4.x.dev/_benchmark/clean.sh deleted file mode 100755 index 36d8cb0..0000000 --- a/ubiquity-2.4.x.dev/_benchmark/clean.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -rm -rf !("_benchmark") -find -path './.*' -delete -rm -rf _benchmark/temp \ No newline at end of file diff --git a/ubiquity-2.4.x.dev/_benchmark/hello_world.sh b/ubiquity-2.4.x.dev/_benchmark/hello_world.sh deleted file mode 100755 index 51c4f0e..0000000 --- a/ubiquity-2.4.x.dev/_benchmark/hello_world.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -url="$base/$fw/public/index.php?c=HelloWorldController/index" \ No newline at end of file diff --git a/ubiquity-2.4.x.dev/_benchmark/setup.sh b/ubiquity-2.4.x.dev/_benchmark/setup.sh deleted file mode 100755 index 186b945..0000000 --- a/ubiquity-2.4.x.dev/_benchmark/setup.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -# create project -rm -rf _benchmark/temp -composer create-project phpmv/ubiquity-project:2.4.x-dev ./_benchmark/temp --ansi -mv ./_benchmark/temp/{.,}* ./ - -# have the route & controller -yes|cp -rf _benchmark/ubiquity/. ./ - -# some enhancements -composer install --no-dev --optimize-autoloader --ansi -rm ./public/.htaccess \ No newline at end of file diff --git a/ubiquity-2.4.x.dev/_benchmark/ubiquity/app/config/config.php b/ubiquity-2.4.x.dev/_benchmark/ubiquity/app/config/config.php deleted file mode 100644 index 73c3986..0000000 --- a/ubiquity-2.4.x.dev/_benchmark/ubiquity/app/config/config.php +++ /dev/null @@ -1,27 +0,0 @@ -"http://127.0.0.1/temp/public/", - "database"=>[ - "type"=>"mysql", - "dbName"=>"", - "serverName"=>"127.0.0.1", - "port"=>"3306", - "user"=>"root", - "password"=>"", - "options"=>[], - "cache"=>false - ], - "sessionName"=>"temp", - "namespaces"=>[], - //"templateEngine"=>'Ubiquity\\views\\engine\\Twig', - "templateEngineOptions"=>array("cache"=>true), - "test"=>false, - "debug"=>false, - "logger"=>function(){return new \Ubiquity\log\libraries\UMonolog("temp",\Monolog\Logger::INFO);}, - "di"=>["@exec"=>["jquery"=>function($controller){ - /* *** PHP-Frameworks-Bench *** */ - // return \Ajax\php\ubiquity\JsUtils::diSemantic($controller); - }]], - "cache"=>["directory"=>"cache/","system"=>"Ubiquity\\cache\\system\\ArrayCache","params"=>[]], - "mvcNS"=>["models"=>"models","controllers"=>"controllers","rest"=>""] -); diff --git a/ubiquity-2.4.x.dev/_benchmark/ubiquity/app/controllers/HelloWorldController.php b/ubiquity-2.4.x.dev/_benchmark/ubiquity/app/controllers/HelloWorldController.php deleted file mode 100644 index 5ae506d..0000000 --- a/ubiquity-2.4.x.dev/_benchmark/ubiquity/app/controllers/HelloWorldController.php +++ /dev/null @@ -1,12 +0,0 @@ -