22[ ![ Test PHP benchmark] ( https://github.com/myaaghubi/PHP-Frameworks-Bench/actions/workflows/test.yml/badge.svg )] ( https://github.com/myaaghubi/PHP-Frameworks-Bench/actions/workflows/test.yml ) ![ GitHub release (latest by date)] ( https://img.shields.io/github/v/release/myaaghubi/PHP-Frameworks-Bench?color=purpol ) ![ GitHub] ( https://img.shields.io/github/license/myaaghubi/PHP-Frameworks-Bench?color=green )
33
44
5- This project attempts to measure the minimum overhead (minimum bootstrap cost) of PHP frameworks in the real world.
5+ 📊 This project attempts to measure the minimum overhead (minimum bootstrap cost) of PHP frameworks in the real world.
66
77So I think the minimum should not include:
88
@@ -33,16 +33,18 @@ Benchmarking on components like template engines or ORM/Database libraries is ou
3333
3434#### Environment
3535
36+ For ` PHP 8.2 ` check out [ this link] ( https://github.com/myaaghubi/PHP-Frameworks-Bench/tree/v2.3.1 ) .
37+
3638* Ubuntu 22.04 LTS x86_64
37- * PHP 8.2.5
39+ * PHP 8.3.0
3840 * OPCache Off
3941 * Apache 2.4.52
4042 * WRK 4.2.0 (5 min)
41- * CPU Core i7-3770K@ 4.4Ghz
43+ * CPU Core i7-3770K/ 4.4Ghz
4244 * Memory 16G
4345
4446
45- #### Results (2023/5/15 )
47+ #### Results (2023/12/1 )
4648
4749These are my benchmarks, not yours. ** I encourage you to run on your -production equivalent- environments.**
4850
@@ -53,24 +55,23 @@ These are my benchmarks, not yours. **I encourage you to run on your -production
5355
5456| framework | requests per second (rps)| relative (rps)| peak memory| relative (mem)|
5557| -------------------| ------------------------:| -------------:| ----------:| -------------:|
56- | pure-php | 27,379.94| 282.4| 0.42| 1.0|
57- | kumbiaphp-1.1 | 5,862.48| 60.5| 0.54| 1.3|
58- | fastroute-1.3 | 4,591.01| 47.3| 0.56| 1.3|
59- | phroute-2.2 | 4,303.07| 44.4| 0.58| 1.4|
60- | leaf-3.3 | 1,576.68| 16.3| 1.10| 2.6|
61- | fatfree-3.8.1 | 1,512.30| 15.6| 1.67| 4.0|
62- | slim-4.11 | 805.51| 8.3| 1.57| 3.7|
63- | ubiquity-2.4.x.dev | 726.70| 7.5| 1.64| 3.9|
64- | silex-2.3 | 558.07| 5.8| 2.16| 5.1|
65- | yii-2.0-basic | 508.32| 5.2| 2.57| 6.1|
66- | fuelphp-1.9 | 450.65| 4.6| 2.51| 6.0|
67- | lumen-10.0 | 352.94| 3.6| 3.49| 8.3|
68- | codeigniter-4.3 | 324.27| 3.3| 3.50| 8.3|
69- | symfony-5.4 | 311.74| 3.2| 3.82| 9.1|
70- | laminas-2.0 | 309.30| 3.2| 3.50| 8.3|
71- | symfony-6.3 | 290.69| 3.0| 3.91| 9.3|
72- | cakephp-4.4 | 262.25| 2.7| 4.49| 10.7|
73- | laravel-10.0 | 96.97| 1.0| 11.99| 28.5|
58+ | pure-php | 27,077.31| 321.6| 0.42| 1.0|
59+ | kumbia-1.1 | 5,921.29| 70.3| 0.54| 1.3|
60+ | fastroute-1.3 | 4,516.12| 53.6| 0.56| 1.3|
61+ | phroute-2.2 | 4,198.83| 49.9| 0.58| 1.4|
62+ | leaf-3.5 | 1,487.36| 17.7| 1.11| 2.6|
63+ | fatfree-3.8 | 1,453.82| 17.3| 1.72| 4.1|
64+ | slim-4.12 | 798.17| 9.5| 1.57| 3.7|
65+ | ubiquity-2.4.x.dev | 705.12| 8.4| 1.64| 3.9|
66+ | silex-2.3 | 543.66| 6.5| 2.20| 5.2|
67+ | yii-2.0-basic | 503.76| 6.0| 2.56| 6.1|
68+ | fuelphp-1.9 | 429.18| 5.1| 2.61| 6.2|
69+ | lumen-10.0 | 325.27| 3.9| 3.61| 8.6|
70+ | symfony-5.4 | 309.74| 3.7| 3.77| 9.0|
71+ | codeigniter-4.4 | 302.21| 3.6| 3.62| 8.6|
72+ | symfony-6.4 | 278.58| 3.3| 4.11| 9.8|
73+ | cakephp-4.5 | 246.72| 2.9| 4.63| 11.0|
74+ | laravel-10.2 | 84.19| 1.0| 13.06| 31.0|
7475
7576
7677#### OPCache On
@@ -126,7 +127,7 @@ $ bash benchmark.sh
126127
127128## Docker
128129
129- Results with docker may not be reliable but in a situation you can use it like:
130+ Results with docker may or may not be reliable but in a situation you can use it like:
130131
1311321- Change the ` base ` in ` config ` on the right port(` 8080 ` considered):
132133
@@ -175,13 +176,15 @@ To specify frameworks, put them with `-t ...` after each command:
175176``` bash
176177# supported for `setup.sh`, `benchmark.sh`, `update.sh`, `clean.sh`, and `clear-cache.sh`
177178# bash benchmarks.sh --help
178- $ bash benchmark.sh -t laravel-10.0 / slim-4.11 / ...
179+ $ bash benchmark.sh -t laravel-10.2 / slim-4.12 / ...
179180...
180181```
181182
182183
183184## Add Your Framework
184- Check out the [ Benchmarking Policy] ( #benchmarking-policy ) , to get more information watch the video [ OPCache On/Off] ( #opcache-on ) .
185+ Check out the [ Benchmarking Policy] ( #benchmarking-policy ) , to get more information watch the video
186+
187+ [ OPCache On/Off] ( #opcache-on ) .
185188
186189
187190## Benchmarking Policy
@@ -209,9 +212,17 @@ ETH: 0x0ADd51D6855d2DF11BB5F331A3fa345c67a863b2
209212
210213## References
211214Note: This project is based on
212- [ php-framework-benchmark] ( https://github.com/kenjis/php-framework-benchmark ) , thanks to [ Kenjis] ( https://github.com/kenjis ) . It is very old and abandoned, so I decided to split it from the origin and update it separately.
215+ [ php-framework-benchmark] ( https://github.com/kenjis/php-framework-benchmark ) , thanks to [ Kenjis] ( https://github.com/kenjis ) . It is very old and abandoned, so I decided to split it from the origin and change/update it separately.
216+
217+ 🙏 Thanks to contributors:
218+
219+ - [ Joan Miquel] ( https://github.com/joanhey )
220+
221+ - [ Rostunov Sergey] ( https://github.com/stdex )
222+
223+
213224
214- For frameworks, I considered the official repos:
225+ 📄 For frameworks, I considered the official repos:
215226* [ CakePHP] ( https://github.com/cakephp/cakephp )
216227* [ CodeIgniter] ( https://github.com/codeigniter4/CodeIgniter4 )
217228* [ FastRoute] ( https://github.com/nikic/FastRoute )
@@ -234,4 +245,4 @@ For frameworks, I considered the official repos:
234245
235246You are allowed to use this plugin/project under the terms of the GNU General Public License version 2.
236247
237- Copyright (C) 2023 Mohammad Yaaghubi
248+ Copyright (C) 2024 [ Mohammad Yaaghubi] ( https://github.com/myaaghubi )
0 commit comments