All Projects → myaghobi → PHP-Frameworks-Bench

myaghobi / PHP-Frameworks-Bench

Licence: GPL-2.0 license
Popular PHP Frameworks Benchmark.

Programming Languages

PHP
23972 projects - #3 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to PHP-Frameworks-Bench

Hookphp
HookPHP基于C扩展搭建内置AI编程的架构系统-支持微服务部署|热插拔业务组件-集成业务模型|权限模型|UI组件库|多模板|多平台|多域名|多终端|多语言-含常驻内存|前后分离|API平台|LUA QQ群:679116380
Stars: ✭ 575 (+1953.57%)
Mutual labels:  cakephp, codeigniter, yii
Cron Manager
A PHP cron task manager for MVC-type applications
Stars: ✭ 396 (+1314.29%)
Mutual labels:  codeigniter, yii
rawphp
A powerful, robust and API-first, PHP framework that helps people from different PHP backgrounds work on the same project seamlessly. You can write Laravel, CakePHP, Slim, Symphone and Procedural PHP code inside it and it all works perfectly. Its the PHP Framework for everyone.
Stars: ✭ 31 (+10.71%)
Mutual labels:  cakephp, slim
php-orm-benchmark
The benchmark to compare performance of PHP ORM solutions.
Stars: ✭ 82 (+192.86%)
Mutual labels:  benchmark, cakephp
Identity Card
A simple proof of identity card of the people's Republic of China.
Stars: ✭ 154 (+450%)
Mutual labels:  codeigniter, yii
php-framework-benchmark
php framework benchmark (include laravel、symfony、silex、lumen、slim、yii2、tastphp etc)
Stars: ✭ 17 (-39.29%)
Mutual labels:  benchmark, lumen
SDGym
Benchmarking synthetic data generation methods.
Stars: ✭ 177 (+532.14%)
Mutual labels:  benchmark
cakephp-translate
A CakePHP plugin to manage translations of your static content the easy way via web backend.
Stars: ✭ 18 (-35.71%)
Mutual labels:  cakephp
cache-bench
Explore the impact of virtual memory settings on caching efficiency on Linux systems under memory pressure
Stars: ✭ 25 (-10.71%)
Mutual labels:  benchmark
word-benchmarks
Benchmarks for intrinsic word embeddings evaluation.
Stars: ✭ 45 (+60.71%)
Mutual labels:  benchmark
asset-mix
Provides helpers functions for CakePHP to use Laravel Mix.
Stars: ✭ 27 (-3.57%)
Mutual labels:  cakephp
PHP-Backuper
A framework which will help you to make (incremental) backups of your site.
Stars: ✭ 16 (-42.86%)
Mutual labels:  pure-php
language-benchmarks
A simple benchmark system for compiled and interpreted languages.
Stars: ✭ 21 (-25%)
Mutual labels:  benchmark
Cortex-Plugin
Cortex Plugin, a routing system for WordPress
Stars: ✭ 21 (-25%)
Mutual labels:  fastroute
stefano-tree
Framework agnostic Nested Set (MPTT) implementation for PHP
Stars: ✭ 24 (-14.29%)
Mutual labels:  laminas
glDelegateBench
quick and dirty inference time benchmark for TFLite gles delegate
Stars: ✭ 17 (-39.29%)
Mutual labels:  benchmark
mlgauge
A simple library to benchmark the performance of machine learning methods across different datasets.
Stars: ✭ 22 (-21.43%)
Mutual labels:  benchmark
nodemark
A modern benchmarking library for Node.js
Stars: ✭ 23 (-17.86%)
Mutual labels:  benchmark
ci-theme
UPDATED: Now themes are independent from application with the use of Actions and Filters :D .. The branch WP-Like is not available for public usage but you may contact me if you want a copy of it.
Stars: ✭ 20 (-28.57%)
Mutual labels:  codeigniter
Hotel-Management-System
Web Base Hotel Management System base on CI
Stars: ✭ 57 (+103.57%)
Mutual labels:  codeigniter

PHP Frameworks Bench

GitHub release (latest by date) GitHub

This project attempts to measure the minimum overhead (minimum bootstrap cost) of PHP frameworks in the real world.

So I think the minimum should not include:

  • cost of template engine (HTML output)
  • cost of database manipulation
  • cost of debugging information

Components like Template engines or ORM/Database libraries are out of scope in this project.

Benchmarks

Latest

Environment

  • Ubuntu 22.04 LTS 64bit
    • PHP 8.1.6
    • OPCache enabled
    • Apache 2.4.52
    • CPU Core i7 2600K@4Ghz
    • Memory 16G

Results (2022/5/22)

These are my benchmarks, not yours. I encourage you to run on your (production equivalent) environments.

Benchmark Results Graph Throughput Benchmark Results Graph Memory Benchmark Results Graph Execution Time Benchmark Results Graph Included Files

framework requests per second relative peak memory relative
pure-php 42,114.24 52.1 0.34 1.0
phroute-2.2 33,424.47 42.4 0.34 1.0
fastroute-1.3 33,190.14 42.1 0.34 1.0
siler-1.7.9 22,152.74 28.8 0.36 1.1
leaf-3.0 20,685.10 26.3 0.36 1.1
fatfree-3.8.0 19,282.52 24.5 0.39 1.1
frameworkx-dev 18,033.22 22.9 0.37 1.1
slim-4.10 14,958.27 19.0 0.38 1.1
slim-3.12 14,714.84 18.7 0.39 1.1
yii-2.0-basic 11,831.91 15.0 0.70 2.1
ubiquity-2.4.x.dev 11,669.47 14.8 0.38 1.1
silex-2.3 10,415.74 13.2 0.39 1.1
symfony-5.4 9,761.44 12.4 0.46 1.4
symfony-6.0 9,737.48 12.4 0.45 1.3
lumen-9.0 6,205.79 7.7 0.39 1.1
cakephp-4.3 5,562.91 7.0 0.43 1.3
laminas-2.0.x.dev 5,015.71 6.4 0.49 1.4
fuelphp-1.9 4,894.22 6.2 0.45 1.3
codeigniter-4.1 1,938.43 2.5 1.46 4.3
laravel-9.1 788.76 1.0 0.55 1.6

Benchmarking Policy

This is master branch.

  • Install a framework via composer according to the official documentation.
  • Use the default configuration.
    • Don't remove any components/configurations even if they are not used.
    • With minimum changes to run this benchmark.
  • Set environment production/Turn off debug mode.
  • Run the general optimization in your production environment, like --optimize-autoloader for the composer.
  • Use controller class.

Some frameworks are optimized, some are not, so some people may think using default configuration is not fair. The dept of optimizing a framework depends on the developer's experienced too, so it's the rabbit hole and there is no point in that for benchmarking. I think the default configuration of frameworks is a good starting point to have the ranking points.

If you find something wrong with my code, feel free to send PR. But please note optimizing for the "Hello World" is not acceptable! Building the fastest "Hello World" application is not the goal of this project.

How to Benchmark

If you want to benchmark PHP extension frameworks like Phalcon, you need to install the extenstions.

1- Download & install the library in your localhost:

# you can put --branch vx.x
$ git clone https://github.com/myaghobi/php-frameworks-bench.git

$ cd php-frameworks-bench

# run the setup & follow the progress
$ bash setup.sh

2- To make sure everything is ok:

# this is optional
$ bash check.sh

3- Run benchmarks:

$ bash benchmark.sh

4- Check the resuts:

http://localhost/php-frameworks-bench/

Commands

# composer update for each framework
$ bash update.sh

# to clean them all
# trouble? run it then
# you can use setup.sh 
$ bash clean.sh

# clear the cache of frameworks
$ bash clear-cache.sh

# show the table of last benchmark
$ bash show-table.sh

To specify the frameworks, put them after each command:

$ bash benchmark.sh laravel-9.1/ slim-4.10/ fatfree-3.8.0/
...

References

Note: This project is based on php-framework-benchmark. It was very old and abandoned, so I decided to split it from the origin and update it separately.

License

You are allowed to use this plugin/project under the terms of the GNU General Public License version 2.

Copyright (C) 2022 Mohammad Yaghobi

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].