PHP 8.4: Release Candidate brings important updates in DOM, MBString and Opcache
The first RC for PHP 8.4 offers optimizations in BcMath, new curl options, numerous bug fixes and additional methods in the Reflection API.
(Image: Aunt Spray / Shutterstock.com)
The first release candidate for the upcoming version 8.4 of the PHP programming language is now available. It offers insights into the upcoming new functions and serves as a test version before the final release, which is planned for November 21.
The new features include optimizations in the BcMath extension, the new curl option CURLOPT_DEBUGFUNCTION, numerous corrections in DOM, MBString and Opcache, as well as additional methods in the Reflection API. The update aims to increase the performance and stability of the programming language.
(Image:Â Wiki PHP)
BcMath and Curl
In the area of BcMath (Binary Calculator Mathematics) – a PHP extension that provides functions for the exact calculation of large numbers and decimal numbers –, the development team has optimized the performance of the bcpow() function and added a check for scale overflow. With the new function bcdivmod, the quotient and remainder of a division can be calculated simultaneously. The development team has also worked on a problem that apparently prevented the conversion of objects into strings during operator calculations.
PHP 8.4 RC 1 integrates the CURLOPT_DEBUGFUNCTION option for the curl extension, which provides extended debugging options. In the debugging area, the upcoming version fixes a bug in the interaction with the debugging tool GDB, which caused a TypeError exception.
Videos by heise
DOM and MBString extension
Several corrections were made to the DOM extension. The developers behind the programming language have ensured that the serialization of xmlns="" is now apparently handled correctly. They have also fixed an assertion error in ext/dom/element.c and a problem when resetting DOM properties.
In the MBString extension, according to the release notes, there was an error in mb_detect_encoding() that contained an invalid encoding "UTF8". The update updates the Unicode data tables to Unicode 16, which allows better support for newer characters.
Opcache and PHPDBG
Opcache receives important updates, including fixing a segmentation fault and introducing the opcache_jit_blacklist() function, which excludes certain functions from just-in-time (JIT) compilation. In the PHPDBG extension, the development team has fixed an assertion error and corrected use-after-free issues in the Perl Compatible Regular Expressions (PCRE) library. UAF problems are a type of security vulnerability that can occur in software if a program continues to access a memory area after it has been released.
In addition to the new features mentioned above, the release includes further optimizations in the PDO_PGSQL extension, additional methods in the Reflection API, bug fixes in SimpleXML and SOAP, as well as revisions in the areas of SPL, streams, TSRM and Windows support.
More information about the first release candidate of PHP 8.4 can be found in the release notes on GitHub.
(mdo)