PHP 8.5 for selfbuilders

Today we have the release of PHP 8.5 to the world. I’m not going to write about all the interesting changes that happend for people developing PHP. But I’ll just list some changes that might be interesing for people building from source or managing a big fleet of servers with PHP.

Opcache is built-in

For all previous versions you could build opcache as a shared extension. With PHP 8.5 it is now pulled in core. So for some distributions offering a separate opcache package this will no longer be needed and have a Replaces: php-8.5-opcache (dummy example) on the main php-8.5 package.

Before:

$ tree /usr/lib/php84/modules 
/usr/lib/php84/modules
├── ...
├── opcache.so
└── ...

After: no longer there.

You can still use all configuration options in the ini files for opcache but you will no longer need the following: (this will generate a warning now)

[opcache]
zend_extension=opcache.so

No more disable_classes

In some cases people use disable_functions and disable_classes as a first line of defence to respond to spammers or other malcious behaviour of a site. As of PHP 8.5 disable_classes is gone because it does more harm than good for the PHP engine.

New fatal_error_backtraces

This will help debugging fatal errors greatly. It is enabled by default.

For PHP developers

Read Brent’s “What’s new in PHP 8.5” or for a full set of changes read UPGRADING and NEWS.