What’s New in PHP 8.4? Key Features, Changes, and Deprecations
PHP 8.4, the first official release of the new major version, adds numerous functions and curl options, updates OpenSSL and MBString, modifies syntax such as making exit/die true functions, raises default bcrypt cost, and deprecates or removes several legacy features, providing a comprehensive overview of the upgrade.
PHP 8.4 New and Changed Features
curl_getinfonow supports
CURLINFO_POSTTRANSFER_TIME_T curl_version()now supports feature_list New functions: http_get_last_response_headers, http_clear_last_response_headers New curl options: CURLOPT_PREREQFUNCTION, CURLOPT_DEBUGFUNCTION, CURLOPT_SERVER_RESPONSE_TIMEOUT (replaces CURLOPT_FTP_RESPONSE_TIMEOUT), CURLOPT_TCP_KEEPCNT New function round() (invalid rounding modes now throw \ValueError)
New multibyte string functions: mb_trim, mb_ltrim,
mb_rtrim DateTimeImmutableadds createFromTimestamp and getMicrosecond / setMicrosecond methods phpinfo now displays integer size information
New function request_parse_body PCRE2 upgraded with related regex changes
PHP 8.4 Syntax and Behaviour Changes
OpenSSL minimum version raised to 1.1.1 MBString Unicode database updated to version 16 exit / die become true functions rather than language constructs CURLOPT_DNS_USE_GLOBAL_CACHE is no longer effective
Password hashing default algorithm remains Bcrypt but the cost increases from 10 to 12 Constants PHP_ZTS and PHP_DEBUG change type from int to bool Opcache JIT enabling method changed via INI settings
Curl now requires libcurl version 7.61.0 or higher
Deprecated Features in PHP 8.4
Implicitly nullable parameter declarations are deprecated
Constant E_STRICT is deprecated
Calling session_set_save_handler() with more than two arguments is deprecated
CSV functions now require the $escape parameter
Option CURLOPT_BINARYTRANSFER is deprecated
Removed Features in PHP 8.4
Pspell extension moved from core to PECL
IMAP extension moved from core to PECL
OCI8 and PDO-OCI extensions moved from core to PECL
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Open Source Tech Hub
Sharing cutting-edge internet technologies and practical AI resources.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
