Home / Companies / Aerospike / Blog / Post Details
Content Deep Dive

PHP 7 vs. PHP 5: A Performance Comparison

Blog post from Aerospike

Post Details
Company
Date Published
Author
Aerospike Engineering
Word Count
1,189
Company Posts That Month
3
Language
English
Hacker News Points
-
Post removed?
No
Summary

The Aerospike PHP Client is built on top of the Aerospike C Client as an extension for PHP. The main focus of PHP 7 is to optimize the structure that represents a variable in PHP—Zend values (zvals). In PHP 7, zvals are not heap allocated and no longer store a refcount. Instead, the refcount is stored by any complex values the zval points to. This results in significant performance improvements, as storing refcount in the values themselves allows them to be shared independently of the zval structure. The Aerospike PHP Client was benchmarked using the multi-process script (rw-worker.php) with different read/write ratios, four workers, and 100,000 iterations. The test showed that PHP 7 outperforms PHP 5 in terms of total execution time, combined throughput, time spent inside each operation, and memory consumption. The performance improvements are due to significant memory savings, thanks to the new zval representation and hash table implementation in PHP 7.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.