In case of a hard OOM (out of memory) condition, PHP
now calls abort() instead of exit(1),
changing the exit code to 134 and possibly creating a core dump.
The PHP_OS_FAMILY constant has an
AIX value for when running on AIX or IBM i via PASE.
Changes in SAPI Modules
CLI
The built-in development
server now accepts requests using the HTTP
QUERY
method instead of returning 501 Not Implemented.
header_register_callback() now declares
true as its return type.
It has not been able to return false since PHP 8.0.0, when passing an
invalid callback started throwing a
TypeError instead.
register_tick_function() now declares
true as its return type.
It has always returned true on success; an invalid callback throws a
TypeError during argument parsing before
the function body is reached.
ini_get_all() now includes a
"builtin_default_value" element for each directive
when details is true.
It holds the built-in default value of the directive (or null if it
has none), independent of values set in php.ini, on the command line,
or at runtime.
The return type of filter_var_array() has been
narrowed from
array|false|null
to array|false.
The function always establishes an array before filtering, so null was
never returned.
filter_input_array() is unaffected: it still returns
null when the requested superglobal does not exist.
The return structure of mysqli_get_charset() no longer
contains the undocumented "comment" element.
The value of "charsetnr" is now set to a constant
0 as this number was an implementation detail that
should not have been exposed to the public.
OpenSSL
The output of openssl_x509_parse() now contains a
"criticalExtensions" entry listing all critical
certificate extensions.
openssl_sign() and openssl_verify()
now have an additional optional salt_length
argument that allows controlling the RSA-PSS salt
length when
OPENSSL_PKCS1_PSS_PADDING is used.
It accepts an explicit length or one of the new
OPENSSL_RSA_PSS_SALTLEN_*
constants.
PDO_DBLIB
When using persistent connections, there is now a liveness check in
PDO::__construct().
readline_completion_function() now declares
true as its return type.
It has always returned true on success; an invalid callback throws a
TypeError during argument parsing before
the function body is reached.
socket_addrinfo_lookup() now has an additional
optional error_code argument that, when not
null, receives the error code on failure (one of the
EAI_* constants).
The return type of socket_cmsg_space() has been
narrowed from ?int
to int.
Every failure path has thrown a
ValueError since PHP 8.0.0, so null was
never returned.
Zip
The return type of zip_entry_close() has been narrowed
from bool to true.
The function already always returned true.
Other Changes to Extensions
Fileinfo
Upgraded to file 5.48.
Custom compiled magic databases from older file versions must be
regenerated.
Hash
The bundled version of xxHash was upgraded to 0.8.2.
MySQLi
Added the new constant MYSQLI_OPT_COMPRESS.
Opcache
JIT is now supported for ZTS builds
on Apple Silicon.
Changes to INI File Handling
Core
The error_include_args
INI option has been added to make the display of function arguments
consistent in errors; it is off by default.
Previously, whether a function showed a parameter in the error was up to
each call to the internal error function.
Now, all parameters as they were actually passed to the function will be
displayed.
This uses the same infrastructure as stack traces, so sensitive
parameters will not be displayed, and strings will be truncated
according to
zend.exception_string_param_max_len.
MBString
The mbstring.detect_order
INI directive now updates the internal detection order when changed at
runtime via ini_set().
Previously, runtime changes using ini_set() did not
take effect for mb_detect_order().
Setting the directive to null or an empty string at runtime now leaves
the previously configured detection order unchanged.
MySQLi
mysqli.default_port now
checks the validity of the value, which should be between
0 and 65535 inclusive.
Opcache
opcache.jit_debug accepts a
new flag: ZEND_JIT_DEBUG_TRACE_EXIT_INFO_SRC.
When used along with ZEND_JIT_DEBUG_TRACE_EXIT_INFO,
the source of exit points is printed in the exit info output, in debug
builds.
Performance
Core
printf() using only %s and
%d will be compiled into the equivalent string
interpolation, avoiding the overhead of a function call and repeatedly
parsing the format string.
Arguments are now passed more efficiently to known constructors (e.g.
when using new self()).
array_map() using a
first-class
callable or
partial
function application callback will be compiled into the equivalent
foreach loop, avoiding the
creation of intermediate Closures, the overhead of
calling userland callbacks from internal functions and providing for
better insight for the JIT.
The performance of the TAILCALL VM has been improved,
and it is now enabled on Windows when compiling with Clang 19 or later on
x86_64.
The performance of ZTS builds has been improved.
Added a stateless closure cache.
Deeply recursive code that causes the VM to allocate new stack pages
should now be faster.
Improved performance of sorting single-element arrays.
imagebmp(), imagewbmp(),
imagegd(), and imagegd2() now
buffer output when writing to PHP streams, significantly improving
performance when writing images to files.