Research & Documentation 05 Php 8 4

PHP 8.4

PHP 8.4 is scheduled to be released on November 21, 2024. Currently, it has gone through Alpha and Beta testing phases, and on September 26 will enter Release Candidate phase 1. The newest version of PHP contains several new features to expand its functionality.

Feature 1: New Array Functions

PHP 8.4 introduces four new callback functions to search and inspect array elements:

Feature 2: New Rounding Modes

The round() function rounds a floating-point number to the nearest integer or decimal value of a specified precision. Currently, there are four rounding methods:

PHP 8.4 will add the following four rounding methods:

Feature 3: Multi-Byte ucfirst and lcfirst

PHP offers many multi-byte functions to support manipulation of strings encoded in multi-byte encoding (languages that contain more characters than standard encoding can support, namely 256), but previously did not offer such functions for ucfirst and lcfirst, which converts the first character of a string to uppercase or lowercase, respectively. PHP 8.4 will introduce mb_ucfirst and mb_lcfirst, which offer these functions for multi-byte encoded languages.

Summary

PHP 8.4 will introduce several new features that improve its functionality and make writing code easier and more user-friendly, as well as enhancing accessibility. The new array functions will make it easier to perform searches on array data, the new rounding methods give greater ability to work with decimals, and the new multi-byte functions allow easier coding of languages with larger character sets than English.

Sources