To ensure the highest possible compatibility, we also test the WordPress plugins we develop with older WordPress versions, as well as on different PHP versions. Amongst others, we use a development server with Apache under Windows. When we recently wanted to add the latest PHP version 8.2.x to our repertoire, we encountered a problem with the popular caching extension APCu.
What is APCu?
APCu, short for APC User Cache, is a free PHP extension that provides a data cache to improve the performance of PHP applications. It stores data fragments in memory so that they can be retrieved more quickly for repeated requests. This reduces the need to query databases or external data sources again and thus can considerably speed up the loading times of web pages. The data is only persistent as long as the process is running. So it is not necessarily suitable for user data, but explicitly for caching, where it is not too bad if this cache has to be rebuilt from time to time (for example, after a server restart).
The problem
After the update, we received the following error message when starting PHP: