WordPress encourages users to use the latest version of PHP. This makes sense since each new version of PHP is faster and more secure, among other purported benefits. But exactly how much faster will my site be if I upgrade PHP?

PHP 8.0 is purported to be 18.47% faster than PHP 7.4 (https://kinsta.com/blog/php-benchmarks/). So, if I upgrade PHP my site will be 18+% faster, right?
Nope. Sorry. PHP speed is just one of many factors that affect site speed. But, if I upgrade PHP, my site will be a bit faster, a bit more secure, a bit more compatible with new plugins, themes, and WP core, and generally a bit better. Or – it might completely crash (like mine did, till I figured out and fixed the problem) – that’s a subject for a future post. If I never upgrade PHP my site will eventually become very much slower, less secure, and generally more out-of-date than it should be. So, by all means I should stay on the current stable, proven version of PHP.
How much faster is my site after upgrading PHP? Not much. I did a very unscientific analysis, using WebsiteTest.org. I tested with caching (both local server caching and distributed global Cloudflare caching) turned off, and with it turned on, and using both PHP 7.4 and 8.0. WebsiteTest.org does the best job IMHO of the online site speed checkers, but there is still inherent inescapable variability in doing any site speed check over the interwebs.
WebsiteTest.org provides a plethora of metrics. For the sake of simplicity and clarity, I’ll focus in on just one – First Visit Site Speed Index.
With caching OFF:
PHP 7.4, First Visit Site Speed Index = 1.80 seconds
PHP 8.0, First Visit Site Speed Index = 1.78 seconds, a speed increase of 1% (well within the margin of variability for the test)
With caching ON:
PHP 7.4, First Visit Site Speed Index = 1.08 seconds
PHP 8.0, First Visit Site Speed Index = 1.04 seconds, a speed increase of 4% (still within the margin of variability for the test)
So, PHP 8.0 seems to increase site speed just a bit over PHP 7.4 – but the increase would not be noticeable to a user, and could be ascribed to inherent test variability.
The lesson here is I should keep PHP up to date not just for speed, but also – perhaps mostly – for security and compatibility.
Not really the point of this post, but kinda interesting to see the speed increase provided by caching in this test – roughly 40%.

