PHP 8.4: What's New and Changed
New Features in PHP 8.4
- Sodium:
AEGIS-128LandAEGIS256support - New
array_find,array_find_key,array_any, andarray_allfunctions - New
grapheme_str_splitfunction - BCMath: New
bcdivmodfunction - Intl: New
intltz_get_iana_idfunction andIntlTimeZone::getCanonicalIDmethod - Curl: New
CURL_HTTP_VERSION_3andCURL_HTTP_VERSION_3ONLYconstants for HTTP/3 support #[Deprecated]attribute- Curl:
curl_getinfo-CURLINFO_POSTTRANSFER_TIME_Tsupport - Curl: New
CURLOPT_PREREQFUNCTIONoption - Curl: New
CURLOPT_DEBUGFUNCTIONoption - Curl: New
CURLOPT_SERVER_RESPONSE_TIMEOUToption to replaceCURLOPT_FTP_RESPONSE_TIMEOUT - Curl: New
CURLOPT_TCP_KEEPCNToption - phpinfo: Show PHP Integer Size information
- Mbstring: New
mb_trim,mb_ltrim, andmb_rtrimfunctions - Date: New
DateTime(Immutable)::createFromTimestampmethods - New rounding modes in
round()function - Date: New
DateTime(Immutable)::get/setMicrosecondmethods - New
request_parse_bodyfunction - PCRE2 Upgrade and Regular Expression Changes
- Curl:
curl_version()feature_listsupport - New
http_(get|clear)_last_response_headersfunctions - New
mb_ucfirstandmb_lcfirstfunctions
Syntax/Functionality Changes in PHP 8.4
- Curl:
CURLOPT_DNS_USE_GLOBAL_CACHEno longer has any effect - MBString: Unicode Character Database updated to version 16
exit/diechanged from language constructs to functionsround()- Invalid rounding modes throw\ValueErrorexceptions- Password Hashing: Default Bcrypt cost changed from
10to12 PHP_ZTSandPHP_DEBUGconstant value type changed frominttobool- Opcache: INI changes on how JIT is enabled
- OpenSSL: Minimum required OpenSSL version increased to 1.1.1
- Curl: Minimum required libcurl version increased to 7.61.0
Deprecations in PHP 8.4
- Implicitly nullable parameter declarations deprecated
E_STRICTconstant deprecated- Calling
session_set_save_handler()with more than 2 arguments deprecated - CSV: The
$escapeparameter must be provided SUNFUNCS_RET_*constants deprecated- Curl:
CURLOPT_BINARYTRANSFERdeprecated