Yii2 running at 2x Performance on PHP 7!

I just completed a benchmark of Yii2 on PHP 5.6.4 vs PHP 7.0.0:

  • PHP 5.6.4 serving between 75-100 Requests per Second at between a 31ms-176ms response time

  • PHP 7.0.0 serving 175 Requests per Second at a 47ms response time.

PHP 7.0.0 does a very nice job here- about 2x the performance for serving Yii2! It seems that it is definitely worth upgrading.

PHP configuration was:

  • Served using NGINX and PHP-FPM

  • OpCache Enabled

  • PHP-FPM pool could spawn up to 25 child processes

You can check out the full post on my findings here: https://caleblloyd.com/software/yii2-php-7-performance/

Congratz Yii-Dev Team :wub: :wub: :D

Can you include instructions on how you installed/set up php7 with nginx? Would like to test myself but there are no php7/nginx guides out there

FYI PHP 7 officially released

http://php.net/archive/2015.php#id2015-12-03-1

I built PHP7 from source on Debian. The PPA here has RC8, it will most likely get 7.0.0 in the next few days: https://launchpad.net/~ondrej/+archive/ubuntu/php-7.0

If you’d like to build from source, here’s a couple guides that I used:

You can follow the guides except use the tagged PHP 7.0.0 release at:

Otherwise integrating php-fpm with NGINX is pretty much the same in 5.6 as it is in 7.0.0 once you have the php-fpm process running.