PHP 8.4: What's New and Changed
New Features in PHP 8.4
- Sodium:
AEGIS-128L
andAEGIS256
support - New
array_find
,array_find_key
,array_any
, andarray_all
functions - New
grapheme_str_split
function - BCMath: New
bcdivmod
function - Intl: New
intltz_get_iana_id
function andIntlTimeZone::getCanonicalID
method - Curl: New
CURL_HTTP_VERSION_3
andCURL_HTTP_VERSION_3ONLY
constants for HTTP/3 support - New
mb_ucfirst
andmb_lcfirst
functions - Curl:
curl_getinfo
-CURLINFO_POSTTRANSFER_TIME_T
support - Curl: New
CURLOPT_PREREQFUNCTION
option - Curl: New
CURLOPT_DEBUGFUNCTION
option - Curl: New
CURLOPT_SERVER_RESPONSE_TIMEOUT
option to replaceCURLOPT_FTP_RESPONSE_TIMEOUT
- Curl: New
CURLOPT_TCP_KEEPCNT
option - New rounding modes in
round()
function - Mbstring: New
mb_trim
,mb_ltrim
, andmb_rtrim
functions - Date: New
DateTime(Immutable)::createFromTimestamp
methods - phpinfo: Show PHP Integer Size information
- Date: New
DateTime(Immutable)::get/setMicrosecond
methods - New
request_parse_body
function - PCRE2 Upgrade and Regular Expression Changes
- Curl:
curl_version()
feature_list
support - New
http_(get|clear)_last_response_headers
functions
Syntax/Functionality Changes in PHP 8.4
exit
/die
changed from language constructs to functions- OpenSSL: Minimum required OpenSSL version increased to 1.1.1
- MBString: Unicode Character Database updated to version 16
- Curl:
CURLOPT_DNS_USE_GLOBAL_CACHE
no longer has any effect - Password Hashing: Default Bcrypt cost changed from
10
to12
PHP_ZTS
andPHP_DEBUG
constant value type changed fromint
tobool
- Opcache: INI changes on how JIT is enabled
round()
- Invalid rounding modes throw\ValueError
exceptions- Curl: Minimum required libcurl version increased to 7.61.0
Deprecations in PHP 8.4
- Implicitly nullable parameter declarations deprecated
E_STRICT
constant deprecated- Calling
session_set_save_handler()
with more than 2 arguments deprecated - CSV: The
$escape
parameter must be provided SUNFUNCS_RET_*
constants deprecated- Curl:
CURLOPT_BINARYTRANSFER
deprecated