Is PHP 7.3 faster than PHP 7.2? Should I use PHP 7.3 for my WordPress site? We have done our own performance testing for WordPress running with WooCommerce and benchmarked PHP 7.2 against PHP 7.3.

We installed a standard WordPress 5.0 with the Storefront theme and imported the 50 products supplied by WooCommerce as sample data on a standard Servebolt High Performance plan.

We wanted to test whether PHP 7.3 was performing better than PHP 7.2, and therefore bypassed the reverse proxy and ran tests directly against the backend web server running the PHP, effectively bypassing all caching. The tests were run from the server to eliminate network bias.

We used ab as the testing tool, running 3.000 requests with a concurrency of 1000, with keep alive enabled.

ab -k -n 3000 -c 30 -H "Host: phpben-4836.bolt57.servebolt.com" http://phpben-4836.bolt57.servebolt.com:8000/

This is ApacheBench, Version 2.3 <$Revision: 1826891 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking phpben-4836.bolt57.servebolt.com (be patient) Completed 300 requests Completed 600 requests Completed 900 requests Completed 1200 requests Completed 1500 requests Completed 1800 requests Completed 2100 requests Completed 2400 requests Completed 2700 requests Completed 3000 requests Finished 3000 requests Server Software: Apache/2.4 Server Hostname: phpben-4836.bolt57.servebolt.com Server Port: 8000 Document Path: / Document Length: 64366 bytes Concurrency Level: 30 Time taken for tests: 13.601 seconds Complete requests: 3000 Failed requests: 0 Keep-Alive requests: 0 Total transferred: 193950000 bytes HTML transferred: 193098000 bytes Requests per second: 220.58 [#/sec] (mean) Time per request: 136.007 [ms] (mean) Time per request: 4.534 [ms] (mean, across all concurrent requests) Transfer rate: 13926.03 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.1 0 1 Processing: 102 135 7.9 137 157 Waiting: 21 31 3.0 32 44 Total: 102 135 7.9 137 157 Percentage of the requests served within a certain time (ms) 50% 137 66% 139 75% 141 80% 142 90% 144 95% 145 98% 147 99% 148 100% 157 (longest request)

We ran this test 3 times on PHP 7.2 and three times on PHP 7.3, and compared the numbers.

PHP 7.2 average: 192 requests per second

PHP 7.3 average: 224 requests per second

The results were consistent with very small variation. WordPress with WooCommerce running PHP 7.3 outperforms PHP 7.2 by 16.67%.

So what are you waiting for? It is time to get that extra performance boost. Upgrade your site to be PHP 7.3 compatible today, and get the 10-17% extra performance boost!

Benchmarks from PHP 5.6 and up

We did a few more compiles of PHP 7.3, and tested benchmarked those. We also did benchmarks on all major versions from 5.6 and up. See the results in the table below.

PHP only

Req/s PHP 5.6 PHP 7.0 PHP 7.1 PHP 7.2 PHP 7.3 PHP 7.3 v2 PHP 7.3 v3 PHP 5.6 401 PHP 7.0 761 189.78% PHP 7.1 809 201.75% 106.31% PHP 7.2 826 206.07% 108.59% 102.14% PHP 7.3 926 230.92% 121.68% 114.46% 112.06% 7.3 v2 960 239.40% 126.15% 118.67% 116.18% 103.67% 7.3 v3 972 242.39% 127.73% 120.15% 117.63% 104.97% 101.25% 7.3 FINAL 980 244.39% 128.78% 121.14% 118.60% 105.83% 102.08% 100.82%

PHP and Database