PHP 8.5: Diffing the ini file

Share
PHP 8.5: Diffing the ini file
Photo by Buddha Elemental 3D / Unsplash

This is a follow up post to the first in this mini series where I explore some of my favourite features in the upcoming PHP 8.5, coming in November. The first post explored the Pipe operator:

PHP 8.5: Pipe Operator
PHP 8.5 is fast approaching. I wanted to look at some of the features I’m most excited about. One of which is, the pipe operator. This makes it easier for developers who need to chain multiple callables who previously may have done something like this: $temp = “Hello World”

This post is all about a new flag being added to php ini ,the --diff flag .

This flag will allow you to see what has been changed, when compared with the default set of values. It's not often I need to go into a php.ini file, but there have been times where I've often wanted to see a history of a certain value. As of PHP 8.5, developers can run php ini --diff to see what is different. The output will look something like:

$ php --ini=diff

Non-default INI settings:
allow_url_include: "0" -> ""
display_errors: "1" -> ""

This is definitely a nice QoL improvement!