PHP 8.1: real-life performance benchmarks

I did a very quick performance test because I wanted to know the impact of PHP 8.1 on my real-life projects.

These benchmarks were taken on my local machine, and only meant to measure the relative difference between PHP 8.0 and 8.1. I benchmarked a page that showed lots of data, with lots of classes loaded, as I expected that inheritance cache would have the largest performance impact.

Metric PHP 8.0 PHP 8.1
Requests per second (#/sec) 32.02 34.75
Time per request (ms) 31.232 28.777

The results seem to be in line what what Dmitry originally reported when he added this feature: a 5-8% performance increase.

Noticed a tpyo? You can submit a PR to fix it. If you want to stay up to date about what's happening on this blog, you can subscribe to my mailing list: send an email to brendt@stitcher.io, and I'll add you to the list.