Software 43948 Published by

PHP 8.5.0 has been released with numerous enhancements and bug fixes that improve its efficiency for web development. The new version introduces explicit function definitions using attributes like #[\NoDiscard] and adds a pipe operator (|>) for chaining operations, as well as functions to manage errors and exceptions. Additionally, it includes bug fixes and performance enhancements, such as improvements in memory leak detection and security patches addressing vulnerabilities in the session extension. Other updates include streamlined BCMath code with new power of zero calculations and various extension fixes across multiple modules.



PHP 8.5.0 released

PHP 8.5.0, the latest version of the popular open-source programming language, has been released after five release candidates. This new version brings numerous enhancements and bug fixes that make it an even more robust and efficient platform for web development.

So, what do we have? It brings a boatload of new stuff and fixes bugs to make things smoother and more secure than before. Initially, the focus is on defining functions explicitly. New attributes help here: you can now mark that a function's return value is important with #[\NoDiscard]. On the flip side, if intentionally ignoring a return isn't your goal for code clarity in certain situations (like constant expressions), using (void) makes that clear too. We're also getting a new operator called the pipe |>, which allows chaining operations together for cleaner code.

Digging into core features and improvements: we've added functions to help manage errors and exceptions, like get_error_handler() and get_exception_handler(). This gives more control over those aspects. And interestingly, support has been added for using casts within constant expressions.

In addition to the new features, this release includes numerous bug fixes and performance enhancements. It tackled memory bugs related to Zend's leak detection system, among others. Security-wise, it addressed several vulnerabilities too, including a potential denial-of-service attack issue in the session extension. 

The RFC side of things also saw progress. For example, the proposal for TAILCALL VM landed and is enabled by default when compiling with Clang >=19 on x86_64 or aarch64 systems. Another RFC aimed at safer increment/decrement operations deprecates using these operators on non-numeric strings, pushing towards better code practices.

Even features like BCMath saw updates: its code was streamlined, and it gained new functions, including support for power of zero calculations. The fixing of several bugs in various extensions, including Curl, Date, DOM, Enchant, EXIF, FileInfo, Filter, FPM, GD, Iconv, Intl, LDAP, MBstring, MySQLi, ODBC, PDO, Phar, POSIX, SimpleXML, SNMP, SOAP, Sockets, and SPL.

Release php-8.5.0 · php/php-src

Tag for php-8.5.0

Release php-8.5.0 · php/php-src