PHP 8.4.1 came out on 21 November 2024. Below is the full list of changes it made, grouped by the part of PHP that each one affects.
Security This release fixed security problems. PHP 8.4 has had newer releases since then, so if your site runs on PHP 8.4, update it to PHP 8.4.27, which includes these fixes.
Adjusted closure names to include the parent function's name. (timwolla)
Improve randomness of uploaded file names and files created by tempnam(). (Arnaud)
Added gc and shutdown callbacks to zend_mm custom handlers. (Florian Engelhardt)
Fixed bug GH-14650 (Compute the size of pages before allocating memory). (Julien Voisin)
Fixed bug GH-11928 (The --enable-re2c-cgoto doesn't add the -g flag). (Peter Kokot)
Added the #[\Deprecated] attribute. (beberlei, timwolla)
Fixed GH-11389 (Allow suspending fibers in destructors). (Arnaud, trowski)
Fixed bug GH-14801 (Fix build for armv7). (andypost)
Implemented property hooks RFC. (ilutov)
Fix GH-14978 (The xmlreader extension phpize build). (Peter Kokot)
Throw Error exception when encountering recursion during comparison, rather than fatal error. (ilutov)
Added missing cstddef include for C++ builds. (cmb)
Updated build system scripts config.guess to 2024-07-27 and config.sub to 2024-05-27. (Peter Kokot)
Fixed bug GH-15240 (Infinite recursion in trait hook). (ilutov)
Fixed bug GH-15140 (Missing variance check for abstract set with asymmetric type). (ilutov)
Fixed bug GH-15181 (Disabled output handler is flushed again). (cmb)
Passing E_USER_ERROR to trigger_error() is now deprecated. (Girgias)
Fixed bug GH-15292 (Dynamic AVX detection is broken for MSVC). (nielsdos)
Using "_" as a class name is now deprecated. (Girgias)
Exiting a namespace now clears seen symbols. (ilutov)
The exit (and die) language constructs now behave more like a function. They can be passed liked callables, are affected by the strict_types declare statement, and now perform the usual type coercions instead of casting any non-integer value to a string. As such, passing invalid types to exit/die may now result in a TypeError being thrown. (Girgias)
Fixed bug GH-15438 (Hooks on constructor promoted properties without visibility are ignored). (ilutov)
Fixed bug GH-16725 (Incorrect access check for non-hooked props in hooked object iterator). (ilutov)
Curl
Deprecated the CURLOPT_BINARYTRANSFER constant. (divinity76)
Bumped required libcurl version to 7.61.0. (Ayesh)
Added feature_list key to the curl_version() return value. (Ayesh)
Added constants CURL_HTTP_VERSION_3 (libcurl 7.66) and CURL_HTTP_VERSION_3ONLY (libcurl 7.88) as options for CURLOPT_HTTP_VERSION (Ayesh Karunaratne)
Added CURLOPT_TCP_KEEPCNT to set the number of probes to send before dropping the connection. (David Carlier)
Added CURLOPT_PREREQFUNCTION Curl option to set a custom callback after the connection is established, but before the request is performed. (Ayesh Karunaratne)
Added CURLOPT_SERVER_RESPONSE_TIMEOUT, which was formerly known as CURLOPT_FTP_RESPONSE_TIMEOUT. (Ayesh Karunaratne)
The CURLOPT_DNS_USE_GLOBAL_CACHE option is now silently ignored. (Ayesh Karunaratne)
Added CURLOPT_DEBUGFUNCTION as a Curl option. (Ayesh Karunaratne)
Fixed bug GH-16359 (crash with curl_setopt* CURLOPT_WRITEFUNCTION without null callback). (David Carlier)
Set to C++17 standard for icu 74 and onwards. (David Carlier)
resourcebundle_get(), ResourceBundle::get(), and accessing offsets on a ResourceBundle object now throw: - TypeError for invalid offset types - ValueError for an empty string - ValueError if the integer index does not fit in a signed 32 bit integer
ResourceBundle::get() now has a tentative return type of: ResourceBundle|array|string|int|null
Added the new Grapheme function grapheme_str_split. (youkidearitai)
Updated Unicode data tables to Unicode 16.0. (Ayesh Karunaratne)
Mysqli
The mysqli_ping() function and mysqli::ping() method are now deprecated, as the reconnect feature was removed in PHP 8.2. (Kamil Tekiela)
The mysqli_kill() function and mysqli::kill() method are now deprecated. If this functionality is needed a SQL "KILL" command can be used instead. (Kamil Tekiela)
The mysqli_refresh() function and mysqli::refresh() method are now deprecated. If this functionality is needed a SQL "FLUSH" command can be used instead. (Kamil Tekiela)
Passing explicitly the $mode parameter to mysqli_store_result() has been deprecated. As the MYSQLI_STORE_RESULT_COPY_DATA constant was only used in conjunction with this function it has also been deprecated. (Girgias)
Fixed bug GH-10599 (Apache crash on Windows when using a self-referencing anonymous function inside a class with an active mysqli connection). (nielsdos)
Opcache
Added large shared segments support for FreeBSD. (David Carlier)
If JIT is enabled, PHP will now exit with a fatal error on startup in case of JIT startup initialization issues. (danog)
Increased the maximum value of opcache.interned_strings_buffer to 32767 on 64bit archs. (Arnaud)
Fixed bug GH-13834 (Applying non-zero offset 36 to null pointer in zend_jit.c). (nielsdos)
Fixed bug GH-14361 (Deep recursion in zend_cfg.c causes segfault). (nielsdos)
Fixed bug GH-14873 (PHP 8.4 min function fails on typed integer). (nielsdos)
Fixed bug GH-15490 (Building of callgraph modifies preloaded symbols). (ilutov)
Fixed bug GH-15178 (Assertion in tracing JIT on hooks). (ilutov)
Fixed bug GH-15657 (Segmentation fault in dasm_x86.h). (nielsdos)
Added opcache_jit_blacklist() function. (Bob)
Fixed bug GH-16009 (Segmentation fault with frameless functions and undefined CVs). (nielsdos)
Fixed bug GH-16186 (Assertion failure in Zend/zend_operators.c). (Arnaud)
Fixed bug GH-16572 (Incorrect result with reflection in low-trigger JIT). (nielsdos)
Fixed GH-16839 (Error on building Opcache JIT for Windows ARM64). (cmb)
Fixed bug GH-16122 (The return value of ReflectionFunction::getNamespaceName() and ReflectionFunction::inNamespace() for closures is incorrect). (timwolla)
Fixed bug GH-16162 (No ReflectionProperty::IS_VIRTUAL) (DanielEScherzer)
Fixed the name of the second parameter of ReflectionClass::resetAsLazyGhost(). (Arnaud)
Session
INI settings session.sid_length and session.sid_bits_per_character are now deprecated. (timwolla)
Emit warnings for non-positive values of session.gc_divisor and negative values of session.gc_probability. (Jorg Sowa)
Fixed bug GH-16590 (UAF in session_encode()). (nielsdos)
SimpleXML
Fix signature of simplexml_import_dom(). (nielsdos)
SNMP
Removed the deprecated inet_ntoa call support. (David Carlier)
SOAP
Add support for clark notation for namespaces in class map. (lxShaDoWxl)
Mitigate #51561 (SoapServer with a extented class and using sessions, lost the setPersistence()). (nielsdos)
Fixed bug #44383 (PHP DateTime not converted to xsd:datetime). (nielsdos)
Fixed bug GH-11941 (soap with session persistence will silently fail when "session" built as a shared object). (nielsdos)
Passing an int to SoapServer::addFunction() is now deprecated. If all PHP functions need to be provided flatten the array returned by get_defined_functions(). (Girgias)
The SOAP_FUNCTIONS_ALL constant is now deprecated. (Girgias)
Fixed bug #61525 (SOAP functions require at least one space after HTTP header colon). (nielsdos)
Removed the deprecated inet_ntoa call support. (David Carlier)
Added the SO_EXECLUSIVEADDRUSE windows constant. (David Carlier)
Added the SOCK_CONN_DGRAM/SOCK_DCCP netbsd constants. (David Carlier)
Added multicast group support for ipv4 on FreeBSD. (jonathan@tangential.ca)
Added the TCP_SYNCNT constant for Linux to set number of attempts to send SYN packets from the client. (David Carlier)
Added the SO_EXCLBIND constant for exclusive socket binding on illumos/solaris. (David Carlier)
Updated the socket_create_listen backlog argument default value to SOMAXCONN. (David Carlier)
Added the SO_NOSIGPIPE constant to control the generation of SIGPIPE for macOs and FreeBSD. (David Carlier)
Added SO_LINGER_SEC for macOs, true equivalent of SO_LINGER in other platforms. (David Carlier)
Add close-on-exec on socket created with socket_accept on unixes. (David Carlier)
Added IP_PORTRANGE* constants for BSD systems to control ephemeral port ranges. (David Carlier)
Added SOCK_NONBLOCK/SOCK_CLOEXEC constants for socket_create and socket_create_pair to apply O_NONBLOCK/O_CLOEXEC flags to the newly created sockets. (David Carlier)
Added SO_BINDTOIFINDEX to bind a socket to an interface index. (David Carlier)
Sodium
Add support for AEGIS-128L and AEGIS-256. (jedisct1)
Enable AES-GCM on aarch64 with the ARM crypto extensions. (jedisct1)
SPL
Implement SeekableIterator for SplObjectStorage. (nielsdos)
The SplFixedArray::__wakeup() method has been deprecated as it implements __serialize() and __unserialize() which need to be overwritten instead. (TysonAndre)
Passing a non-empty string for the $escape parameter of: - SplFileObject::setCsvControl() - SplFileObject::fputcsv() - SplFileObject::fgetcsv() is now deprecated. (Girgias)
Standard
Implement GH-12188 (Indication for the int size in phpinfo()). (timwolla)
Partly fix GH-12143 (Incorrect round() result for 0.49999999999999994). (timwolla)
Fix GH-12252 (round(): Validate the rounding mode). (timwolla)
Increase the default BCrypt cost to 12. (timwolla)
Fixed bug GH-12592 (strcspn() odd behaviour with NUL bytes and empty mask). (nielsdos)
Removed the deprecated inet_ntoa call support. (David Carlier)
Cast large floats that are within int range to int in number_format so the precision is not lost. (Marc Bennewitz)
Add support for 4 new rounding modes to the round() function. (Jorg Sowa)
debug_zval_dump() now indicates whether an array is packed. (Max Semenik)
Changed return type of long2ip to string from string|false. (Jorg Sowa)
Fix GH-12143 (Extend the maximum precision round can handle by one digit). (SakiTakamachi)
Added the http_get_last_response_headers() and http_clear_last_response_headers() that allows retrieving the same content as the magic $http_response_header variable.
Add php_base64_encode_ex() API. (Remi)
Implemented "Raising zero to the power of negative number" RFC. (Jorg Sowa)
Added array_find(), array_find_key(), array_all(), and array_any(). (josh)
Change highlight_string() and print_r() return type to string|true. (Ayesh)
Fix references in request_parse_body() options array. (nielsdos)
Add RoundingMode enum. (timwolla, saki)
Unserializing the uppercase 'S' tag is now deprecated. (timwolla)
Enables crc32 auxiliary detection on OpenBSD. (David Carlier)
Passing a non-empty string for the $escape parameter of: - fputcsv() - fgetcsv() - str_getcsv() is now deprecated. (Girgias)
The str_getcsv() function now throws ValueErrors when the $separator and $enclosure arguments are not one byte long, or if the $escape is not one byte long or the empty string. This aligns the behaviour to be identical to that of fputcsv() and fgetcsv(). (Girgias)
php_uname() now throws ValueErrors on invalid inputs. (Girgias)
The "allowed_classes" option for unserialize() now throws TypeErrors and ValueErrors if it is not an array of class names. (Girgias)
Implemented GH-15685 (improve proc_open error reporting on Windows). (cmb)
Add support for backed enums in http_build_query(). (ilutov)
Fixed bug GH-15982 (Assertion failure with array_find when references are involved). (nielsdos)
Fixed parameter names of fpow() to be identical to pow(). (Girgias)
Streams
Implemented GH-15155 (Stream context is lost when custom stream wrapper is being filtered). (Quentin Dreyer)
Tidy
Failures in the constructor now throw exceptions rather than emitting warnings and having a broken object. (nielsdos)
Add tidyNode::getNextSibling() and tidyNode::getPreviousSibling(). (nielsdos)
Windows
Update the icon of the Windows executables, e.g. php.exe. (Ayesh, Nurudin Imširović)
Fixed bug GH-16199 (GREP_HEADER() is broken). (Peter Kokot)
If you don't want to use our tool or have already tried what follows is a list of three simple tests you can perform to determine your PHP version.We have listed them in order of complexity, starting with the easiest.