Skip to content

Instantly share code, notes, and snippets.

@boogah
Last active January 5, 2018 09:28
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save boogah/13942e026f1b8f60d268 to your computer and use it in GitHub Desktop.
Save boogah/13942e026f1b8f60d268 to your computer and use it in GitHub Desktop.
PHP 5.5 vs. PHP 7

Tests run on an HGV Vagrant using siege (3.0.5) with 25 concurrent users for 5 minutes.

WordPress (4.3.1)

TL;DR: PHP 7 was 2.6 times faster than PHP 5.5

PHP 5.5

Transactions:              4354 hits
Availability:              100.00 %
Elapsed time:              299.64 secs
Data transferred:          17.23 MB
Response time:             1.21 secs
Transaction rate:          14.53 trans/sec
Throughput:                0.06 MB/sec
Concurrency:               17.59
Successful transactions:   4354
Failed transactions:       0
Longest transaction:       2.04
Shortest transaction:      0.12

PHP 7

Transactions:              11333 hits
Availability:              100.00 %
Elapsed time:              299.38 secs
Data transferred:          44.84 MB
Response time:             0.16 secs
Transaction rate:          37.85 trans/sec
Throughput:                0.15 MB/sec
Concurrency:               6.16
Successful transactions:   11333
Failed transactions:       0
Longest transaction:       0.77
Shortest transaction:      0.02

WordPress (4.3.1) + WooCommerce (2.4.8)

TL;DR: PHP 7 was 1.4 times faster than PHP 5.5

PHP 5.5

Transactions:              427 hits
Availability:              100.00 %
Elapsed time:              299.27 secs
Data transferred:          2.73 MB
Response time:             16.61 secs
Transaction rate:          1.43 trans/sec
Throughput:                0.01 MB/sec
Concurrency:               23.70
Successful transactions:   427
Failed transactions:       0
Longest transaction:       22.29
Shortest transaction:      3.05

PHP 7

Transactions:              612 hits
Availability:              100.00 %
Elapsed time:              299.67 secs
Data transferred:          3.92 MB
Response time:             11.54 secs
Transaction rate:          2.04 trans/sec
Throughput:                0.01 MB/sec
Concurrency:               23.57
Successful transactions:   612
Failed transactions:       0
Longest transaction:       18.48
Shortest transaction:      2.39

WordPress (4.3.1) + bbPress (2.5.8)

TL;DR: PHP 7 was 6.6 times faster than PHP 5.5

PHP 5.5

Transactions:              680 hits
Availability:              100.00 %
Elapsed time:              299.29 secs
Data transferred:          3.54 MB
Response time:             10.29 secs
Transaction rate:          2.27 trans/sec
Throughput:                0.01 MB/sec
Concurrency:               23.39
Successful transactions:   680
Failed transactions:       0
Longest transaction:       12.39
Shortest transaction:      1.51

PHP 7

Transactions:              4521 hits
Availability:              100.00 %
Elapsed time:              299.28 secs
Data transferred:          23.52 MB
Response time:             1.15 secs
Transaction rate:          15.11 trans/sec
Throughput:                0.08 MB/sec
Concurrency:               17.38
Successful transactions:   4521
Failed transactions:       0
Longest transaction:       2.21
Shortest transaction:      0.60

WordPress (4.3.1) + BuddyPress (2.3.4)

TL;DR: PHP 7 was 4.7 times faster than PHP 5.5

PHP 5.5

Transactions:              318 hits
Availability:              100.00 %
Elapsed time:              299.60 secs
Data transferred:          3.14 MB
Response time:             22.16 secs
Transaction rate:          1.06 trans/sec
Throughput:                0.01 MB/sec
Concurrency:               23.52
Successful transactions:   318
Failed transactions:       0
Longest transaction:       25.49
Shortest transaction:      3.72

PHP 7

Transactions:              1488 hits
Availability:              100.00 %
Elapsed time:              299.96 secs
Data transferred:          14.68 MB
Response time:             4.51 secs
Transaction rate:          4.96 trans/sec
Throughput:                0.05 MB/sec
Concurrency:               22.39
Successful transactions:   1488
Failed transactions:       0
Longest transaction:       6.27
Shortest transaction:      0.57
@tivnet
Copy link

tivnet commented Nov 3, 2015

@boogah

  1. Thanks
  2. How do you explain difference in results? Why WC was only 1.4 times faster and BP 4.7, for instance? How did you test WC: how many products, on which pages?
  3. Thanks again

@slaFFik
Copy link

slaFFik commented Nov 3, 2015

And about BuddyPress - which components were activated, what data was present in the DB for each of that component?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment