FrameworkBenchmarks icon indicating copy to clipboard operation
FrameworkBenchmarks copied to clipboard

About PHP

Open asadkn opened this issue 13 years ago • 7 comments

One thing you have to understand about PHP is nobody except the shared webhosts use the technologies you're using.

First of all, any serious PHP app should be using APC by default. It's the nature of how PHP works by default vs other language deployments. Second, use php-fpm + nginx web server (or at least worker mpm in Apache 2.4 with php-fpm or fastcgi).

asadkn avatar Mar 28 '13 14:03 asadkn

+1

CHH avatar Mar 28 '13 15:03 CHH

And add Zend benchmarks too, please :smile:

hassankhan avatar Mar 28 '13 15:03 hassankhan

I understand that purpose of this benchmark was to compare your library with other solutions, but I believe PHP was not tested fairly.

  1. 5.3 has reached end of life and 5.4 or 5.5 branch should be used instead. From my observation, applications on 5.4 perform much better and consume less memory comparing to 5.3 version, I have not tested 5.5 but it should not be worst than previous.
  2. PDO is a bit slower, as it has higher abstraction layer comparing to MySQLi, which is more suitable to be called RAW.
  3. It's important to state how do you run PHP on Apache server, as performance may vary, in my case DSO was 5 times faster than FastCGI.
  4. Why did you chose a CakePHP? It's cute but it is not that type of framework that can be considered as good choice for a serious project. Instead I would look in to Zend, Symfony or YII.

Nazariy avatar Mar 29 '13 15:03 Nazariy

I also think the choice of cakePHP is very bad. it's quite well known that it's one of the slowest framework in the php world.

these benchmarks are not really recent but they give a good idea : http://symfony2.openthinklabs.com/home/cepat (based on this code : https://github.com/fabpot/framework-benchs)

I also made a more up-to-date version : https://github.com/onigoetz/framework-benchs and found that codeIgniter is even faster.

I did not update these benchmarks for a long time but I think running them now would give more or less the same results.

I would also test Laravel 4 as I heard it is faster than codeIgniter

onigoetz avatar Mar 29 '13 18:03 onigoetz

+1

alexbilbie avatar Mar 29 '13 21:03 alexbilbie

Thanks for all the comments, we're currently looking into many of your suggestions. We're going to try both PHP 5.4 with APC and 5.5 with Zend optimizer, as well as use php-fpm on Apache (nginx will be next on the list). We're hoping to have updated results sometime next week.

ghost avatar Mar 29 '13 22:03 ghost

We're putting together the next round of numbers now, and we're going to be using PHP 5.4 with APC, php-fpm, and nginx. We're hoping to have updated results later this week.

We created some new issues to address the other recommendations.

ghost avatar Apr 03 '13 21:04 ghost