The PHP version that comes with Raspbian is the 5.4.45 at the time I’m writing this. Recently I’ve installed OwnCloud 8.2.2, which recommends PHP 5.6 or newer, so, I decided to compile a newer version by myself. Indeed I tried with a couple of newer versions: 5.6.18 and 7.0.3, both with php-fpm support.
After compiling, configuring and running both versions as separated php-fpm sockets, I runned this benchmark script to compare them, and these were the results:
PHP-5-6-18:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
-------------------------------------- | PHP BENCHMARK SCRIPT | -------------------------------------- Start : 2016-02-14 23:25:27 Server : raspberrypi@192.168.1.77 PHP version : 5.6.18 Platform : Linux -------------------------------------- test_math : 14.507 sec. test_stringmanipulation : 15.244 sec. test_loops : 8.554 sec. test_ifelse : 5.554 sec. -------------------------------------- Total time: : 43.859 sec. |
PHP-7.0.3:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
-------------------------------------- | PHP BENCHMARK SCRIPT | -------------------------------------- Start : 2016-02-14 23:24:53 Server : raspberrypi@192.168.1.77 PHP version : 7.0.3 Platform : Linux -------------------------------------- test_math : 3.947 sec. test_stringmanipulation : 5.452 sec. test_loops : 4.150 sec. test_ifelse : 2.725 sec. -------------------------------------- Total time: : 16.274 sec. |
It’s awesome, isn’t it? 🙂