You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The builtin server looks for an index file recursively by traversing parent directories in case the specified file cannot be located.
This process was previously skipped if the path looked like it was referring to a file,
i.e. if the last path component contained a period.
In that case, a 404 error was returned.
The behavior has been changed to look for an index file in all cases.
Added CURL_HTTP_VERSION_3 and CURL_HTTP_VERSION_3ONLY constants (available since libcurl 7.66 and 7.88) as available options for CURLOPT_HTTP_VERSION ([PHP 8.4] Curl new options and constants #4069)
Added CURLOPT_PREREQFUNCTION as a cURL option that accepts a callable to be called after the connection is made, but before the request is sent. This callable must return either CURL_PREREQFUNC_OK or CURL_PREREQFUNC_ABORT to allow or abort the request ([PHP 8.4] Curl new options and constants #4069)
Added CURLOPT_DEBUGFUNCTION as a cURL option that accepts a callable that gets called during the request lifetime with the CurlHandle object, an integer containing the debug message type, and a string containing the debug message ([PHP 8.4] Curl new options and constants #4069)
The curl_getinfo() now returns an additional posttransfer_time_us key, containing the number of microseconds from the start until the last byte is sent. When a redirect is followed, the time from each request is added together. This value can also be retrieved by passing CURLINFO_POSTTRANSFER_TIME_T to the curl_getinfo() option parameter. This requires libcurl 8.10.0 or later ([PHP 8.4] Curl new options and constants #4069)
Date: ✅
Details
Deprecated:
The DatePeriod::__construct(string $isostr, int $options = 0) signature is now deprecated.
Use DatePeriod::createFromISO8601String() instead. (7d81260)
Some DOM methods previously returned false or a PHP_ERRDOMException if a new node could not be allocated. They now consistently throw an INVALID_STATE_ERRDOMException. (Skipped as this is rare and can be documented as part of PHP_ERR deprecation.)
Calling intlcal_set() or IntlCalendar::set() with more than 2 arguments is deprecated, use IntlCalendar::setDate() or IntlCalendar::setDateTime() instead.
Calling intlgregcal_create_instance() or IntlGregorianCalendar::__construct() with more than 2 arguments is deprecated, use IntlGregorianCalendar::createFromDate() or IntlGregorianCalendar::createFromDateTime() instead.
Added NumberFormatter::ROUND_TOWARD_ZERO and NumberFormatter::ROUND_AWAY_FROM_ZERO as aliases for NumberFormatter::ROUND_DOWN and NumberFormatter::ROUND_UP to be consistent with the new RoundingMode modes.
Other changes:
ResourceBundle::get() now has a tentative return type of ResourceBundle|array|string|int|null
The idn_to_ascii() and idn_to_utf8() functions now always throw ValueErrors if the domain name is empty or too long.
The idn_to_ascii() and idn_to_utf8() functions now always throw ValueErrors if the variant parameter is not INTL_IDNA_VARIANT_UTS46.
The behaviour of Intl class has been normalized to always throw Error exceptions when attempting to use a non-initialized object, or when cloning fails.
The minimum libxml2 version required is now 2.9.4.
libxml_set_streams_context() now immediately throws a TypeError when a non-stream-context resource is passed to the function, instead of throwing later when the stream context is used.
MBString:
BC Break:
On invalid strings (those with encoding errors), mb_substr() now interprets character indices in the same manner as most other mbstring functions. This means that character indices returned by mb_strpos() can be passed to mb_substr().
For SJIS-Mac (MacJapanese) strings, character indices passed to mb_substr() now refer to the indices of the Unicode codepoints which are produced when the string is converted to Unicode. This is significant because around 40 SJIS-Mac characters convert to a sequence of multiple Unicode codepoints.
Other changes:
The behavior of mb_strcut() is more consistent now on invalid UTF-8 and UTF-16 strings. There is no behavioural change for valid UTF-8 and UTF-16 strings.
Unicode data tables have been updated to Unicode 16.0.
The error code reported for MySQL server wait timeouts has been changed from 2006 to 4031 for MySQL server versions 8.0.24 and above.
Other changes:
Support for the new VECTOR data type from MySQL 9.
ODBC
Other changes:
The row of odbc_fetch_object(), odbc_fetch_array(), and odbc_fetch_into() now have a default value of null, consistent with odbc_fetch_row(). Previously, the default values were -1, -1, and 0, respectively.
Parsing ASN.1 UTCTime with openssl_x509_parse() fails if seconds are omitted for OpenSSL version below 3.2 (-1 is returned for such fields). OpenSSL version above 3.3 did not load such certificates already. (Add note about openssl_x509_parse time parsing change in 8.4 #4317)
The bundled pcre2lib has been updated to version 10.44.
New Features
TODO
Added support for the r (PCRE2_EXTRA_CASELESS_RESTRICT) modifier,
as well as the (?r) mode modifier. When enabled along with the case-insensitive modifier (i),
the expression locks out mixing of ASCII and non-ASCII characters.
([PHP 8.4] PCRE - PCRE2-v10.44 updates #4078)
Changing the value of the session.use_only_cookies INI setting
Changing the value of the session.use_trans_sid INI setting
Changing the value of the session.trans_sid_tags INI setting
Changing the value of the session.trans_sid_hosts INI setting
Changing the value of the session.referer_check INI setting
SID constant
SimpleXML:
BC Break:
SimpleXMLElement now doesn't implicitly rewind itself.
SOAP:
BC Break:
SoapClient::$typemap is now an array instead of a resource, checks using is_resource() should be converted to check for null
Optional dependency on ext/session which has issues with rtld-now
Deprecated:
Passing an int to SoapServer::addFunction()
SOAP_FUNCTIONS_ALL constant
New Features
Added support for clark notation for namespaces in class map
Session persistence now works with a shared session module
Instances of DateTimeInterface that are passed to xsd:datetime or similar elements are now serialized as such instead of being serialized as an empty string.
The SplPriorityQueue::insert(), SplPriorityQueue::recoverFromCorruption(), SplHeap::insert(), SplHeap::recoverFromCorruption() methods now have a tentative return type of true instead of bool. (Document some SPL changes in PHP-8.4 #4047)
Out of bounds accesses in SplFixedArray now throw exceptions of type OutOfBoundsException instead of RuntimeException.
Standard:
BC Break:
strcspn() now correctly returns the length of the string if $characters is the empty string, instead of the length until the first null byte (Add PHP 8.4 changelog entry for strcspn() #3888)
stream_bucket_make_writeable() and stream_bucket_new() now return an instance of StreamBucket instead of stdClass (PHP 8.4: Document StreamBucket #4297)
The default 'cost' value for the PASSWORD_BCRYPT hashing algorithm for password_hash() has been increased from 10 to 12. (password_hash: Update for PHP 8.4 #4455)
debug_zval_dump() now indicates whether an array is packed.
Added XSLTProcessor::$maxTemplateDepth and XSLTProcessor::$maxTemplateVars to control the recursion depth of XSL template evaluation. (Document XSLTProcessor properties #4041)
Pages which need to be added/modified for complete documentation of PHP 8.4:
Based of the migration guide: https://www.php.net/manual/en/migration84.php (#3822):
Related to php/doc-base#165
Note
This issue is still a Work In Progress
Missing items:
Important
Priority should be given to documenting Core language and ext/standard behavioural changes
Core
New features: ✅
Details
#[\Deprecated]attribute (Document#[\Deprecated]#3894)request_parse_body()Parsing RFC1867 (multipart) requests in non-POST HTTP requests (Create stub for request_parse_body() #4108)newwithout parenthesis (Add documentation for new MyClass()->method() without parentheses #3978)WeakReference::__debugInfo()changelog #4256)Closure::__debugInfo()changelog #4257)Defining Identical Symbols in Different Namespace BlocksThis is more of a bugfix than anything elseDeprecated: ✅
Details
_as class name (PHP 8.4: Single underscore as class name is deprecated #4099)trigger_error()withE_USER_ERROR(Use modern markup for E_* constants #4056, PHP 8.4: trigger_error() updates #4063)E_STRICTconstant (Use modern markup for E_* constants #4056)BC Break:
exit()behavioural changes (PHP 8.4: exit() is now a function #4070)Removal ofThis is an internal engine changeE_STRICTerror levelNew Functions: ✅
request_parse_body(Create stub for request_parse_body() #4108)New Classes: ✅
Deprecated(Document#[\Deprecated]#3894)RequestParseBodyException(Create stub for request_parse_body() #4108)New Constants: ✅
PHP_OUTPUT_HANDLER_PROCESSED(Update output control constants #3039, Fix GH-3384 #3587)PHP_SBINDIR(Add PHP_SBINDIR (PHP-8.4) #3423)Changed Functions: ✅
trigger_error()anduser_error()have a return type oftrueinstead ofboolnow (PHP 8.4: trigger_error() updates #4063)Other Changes:
output_add_rewrite_var()now usesurl_rewriter.hostsINI (Document output_add_rewrite_var() url_rewriter.hosts bugfix #4351)SAPI
apache2handler:
FPM:
/dev/pollevents.mechanismsetting for Solaris/Illumos had been retired. (noted in Fix FPM event mechanism poll typo and improve it #4334)CLI:
This process was previously skipped if the path looked like it was referring to a file,
i.e. if the last path component contained a period.
In that case, a 404 error was returned.
The behavior has been changed to look for an index file in all cases.
Class constants are now typed
ext-dateconstant types #4237)ext-intlconstant types #4238)PDOchangelog #4243)Reflection#4244)New warnings and exceptions ✅
All done, collapsed for readability
cURL: ✅
curl_multi_select()now throws aValueErrorif$timeoutis less than 0 or greater thanPHP_INT_MAX([PHP 8.4] Add errors for curl_multi_select #3965)GD: ✅
imagejpeg(),imagepng(),imageavif(),imagewebp()now throw aValueErrorif$qualityis invalid ([PHP 8.4] Add errors for GD functions #3962)imageavif()now throw aValueErrorif$speedis invalid ([PHP 8.4] Add errors for GD functions #3962)imagescale()now throw aValueErrorif$modeis invalid ([PHP 8.4] Add errors for GD functions #3962)imagescale()now throw aValueErrorif$widthor$heightover/underflows ([PHP 8.4] Add errors for GD functions #3962)imagefilter()now throw aValueErrorwith theIMG_FILTER_SCATTERfilter if$subor$plusover/underflows ([PHP 8.4] Add errors for GD functions #3962)GetText: ✅
bind_textdomain_codeset(),textdomain(),d*gettext()now throw aValueErrorif$domainis the empty string ([PHP 8.4] Add errors for GetText functions #3964)Intl: ✅
resourcebundle_get(),ResourceBundle::get(), and offset access forResourceBundleTypeErrorfor invalid offset typesValueErrorfor an empty stringValueErrorif the integer index does not fit in a signed 32 bit integerIntlDateFormatter::__construct()now throws aValueErrorif$localeis invalidNumberFormatter::__construct()now throws aValueErrorif$localeis invalidMBstring: ✅ (#4245)
mb_encode_numericentity(),mb_decode_numericentity()now check that$maponly has integersmb_http_input()throwsValueErrorif$typeis invalidmb_http_output()throwsValueErrorif$encodinghas null bytesODBC: ✅
odbc_fetch_row()returnsfalsewhen$row =< 0, this now warns ([PHP 8.4]odbc_fetch_row()can emit aE_WARNING#4258)PCNTL: ✅ (#4208)
pcntl_sigprocmask(),pcntl_sigwaitinfo(), andpcntl_sigtimedwaitValueErrorif$signalsarray is emptyTypeErrorif$signalsarray value is not intValueErrorif$signalsarray value is not valid signalpcntl_sigprocmask()ValueErrorif$modeis not one ofSIG_BLOCK,SIG_UNBLOCKorSIG_SETMASKpcntl_sigtimedwait()ValueErrorif$secondsis less than 0ValueErrorif$nanosecondsis less than 0ValueErrorif$secondsand$nanosecondsare both 0SimpleXML: ✅
simplexml_import_dom()throwsTypeErrorinstead ofValueErrorif called with non XML object (Update simplexml_import_dom for PHP 8.4 #3906)Standard: ✅
round()now throws aValueErrorfor invalid$mode, before interpreted asPHP_ROUND_HALF_UP([PHP 8.4]round()can throw aValueError#4259)php_uname()now throws aValueErrorfor invalid$mode#3968ValueErrorandValueErrorare thrown if the"allowed_classes"option ofunserialize()is not an array of class names ([PHP 8.4]unserialize()can throw aValueErrorandTypeError#4260)str_getcsv()(PHP 8.4: CSV related changes and deprecations #4093)ValueErrorif$separatoris not one byte longValueErrorif$enclosureis not one byte longValueErrorif$escapeis not one byte long or the empty stringXMLReader: ✅ (#4123)
XMLReader::open()throwsValueErrorif$encodingis invalid / has nullsXMLReader::XML()throwsValueErrorif$encodingis invalid / has nullsXMLWriter: ✅ (#4123)
ValueErrorXSL: ✅
XSLTProcessor::importStyleSheet()throwsTypeErrorinstead ofValueErrorif called with non XML object. (PHP 8.4: Document errors for XSLTProcessor::importStylesheet() #4136)XSLTProcessor::setParameter()parameters that contain null bytes now throws aValueError(PHP 8.4: Document XSLTProcessor::setParameter() errors #4135)Resource to Object conversions
DBA: ✅
Dba\Connection([PHP 8.4] DBA resource to Object conversions #3914)ODBC:
Odbc\ConnectionOdbc\ResultSoap:
Soap\UrlSoap\SdlRemoved extensions ✅ (#4103)
Details
Extensions
cURL: ✅
Details
CURLOPT_BINARYTRANSFERconstant (Update CURLOPT constant descriptions #3818)CURLOPT_DNS_USE_GLOBAL_CACHEconstant has no effect ([PHP 8.4] Curl new options and constants #4069)curl_version()returns an additionalfeature_listvalue, which is an associative array of all known cURL features ([PHP 8.4] Curl new options and constants #4069)CURL_HTTP_VERSION_3andCURL_HTTP_VERSION_3ONLYconstants (available since libcurl 7.66 and 7.88) as available options for CURLOPT_HTTP_VERSION ([PHP 8.4] Curl new options and constants #4069)CURLOPT_PREREQFUNCTIONas a cURL option that accepts a callable to be called after the connection is made, but before the request is sent. This callable must return either CURL_PREREQFUNC_OK or CURL_PREREQFUNC_ABORT to allow or abort the request ([PHP 8.4] Curl new options and constants #4069)CURLOPT_SERVER_RESPONSE_TIMEOUT, which was formerly known as CURLOPT_FTP_RESPONSE_TIMEOUT. Both constants hold the same value ([PHP 8.4] Curl new options and constants #4069)CURLOPT_DEBUGFUNCTIONas a cURL option that accepts a callable that gets called during the request lifetime with the CurlHandle object, an integer containing the debug message type, and a string containing the debug message ([PHP 8.4] Curl new options and constants #4069)curl_getinfo()now returns an additionalposttransfer_time_uskey, containing the number of microseconds from the start until the last byte is sent. When a redirect is followed, the time from each request is added together. This value can also be retrieved by passingCURLINFO_POSTTRANSFER_TIME_Tto thecurl_getinfo()option parameter. This requires libcurl 8.10.0 or later ([PHP 8.4] Curl new options and constants #4069)Date: ✅
Details
DatePeriod::__construct(string $isostr, int $options = 0)signature is now deprecated.Use
DatePeriod::createFromISO8601String()instead. (7d81260)SUNFUNCS_RET_TIMESTAMP,SUNFUNCS_RET_STRING, andSUNFUNCS_RET_DOUBLEconstants are now deprecated. (SUNFUNCS_* constants are deprecated as of PHP 8.4.0 #4006)DBA: ✅
Details
nullorfalsetodba_key_split()is now deprecated. It would always returnfalsein those cases. (dba_key_split() deprecation #4007)Dba\Connection([PHP 8.4] DBA resource to Object conversions #3914)DOM: ✅
Details
falseor aPHP_ERRDOMExceptionif a new node could not be allocated. They now consistently throw anINVALID_STATE_ERRDOMException. (Skipped as this is rare and can be documented as part ofPHP_ERRdeprecation.)DOMImplementation::createDocument()now has a tentative return type ofDOMDocument(Document DOMImplementation::createDocument() change for PHP 8.4 #3901)DOMXPathobjects (Document clone behaviour of DOMXPath #3925)DOMImplementation::getFeature()has been removedDOM_PHP_ERRconstant is now deprecated.DOMDocument::$actualEncodingproperty is now formally deprecated.DOMDocument::$configproperty is now formally deprecated.DOMEntity::$actualEncodingproperty is now formally deprecated.DOMEntity::$encodingproperty is now formally deprecated.DOMEntity::$versionproperty is now formally deprecated.DOMNode::compareDocumentPosition()with its associated constants: (Document compareDocumentPosition & related constants #4081)DOMNode::DOCUMENT_POSITION_DISCONNECTEDDOMNode::DOCUMENT_POSITION_PRECEDINGDOMNode::DOCUMENT_POSITION_FOLLOWINGDOMNode::DOCUMENT_POSITION_CONTAINSDOMNode::DOCUMENT_POSITION_CONTAINED_BYDOMNode::DOCUMENT_POSITION_IMPLEMENTATION_SPECIFICDOMXPath::registerPhpFunctionNS()(add XSLTProcessor::registerPHPFunctionNS and DOMXPath::registerPhpFunctionNS #4129)DOMXPath::quote()(Document DOMXPath::quote() #3909)DOMDocument::registerNodeClass()now has a tentative return type oftrueinstead ofbool(Document tentative return type change for DOMDocument::registerNodeClass() #4082)GMP:
GMPis now final (gmp: GMP is marked final #3990)GMPtobool, before was aE_RECOVERABLE_ERRORHash: ✅ (#4137)
Details
hash_update()now has a tentative return type oftrueinstead ofboolIntl:
intlcal_set()orIntlCalendar::set()with more than 2 arguments is deprecated, useIntlCalendar::setDate()orIntlCalendar::setDateTime()instead.intlgregcal_create_instance()orIntlGregorianCalendar::__construct()with more than 2 arguments is deprecated, useIntlGregorianCalendar::createFromDate()orIntlGregorianCalendar::createFromDateTime()instead.NumberFormatter::ROUND_HALFODDto complement the existingNumberFormatter::ROUND_HALFEVENfunctionality.NumberFormatter::ROUND_TOWARD_ZEROandNumberFormatter::ROUND_AWAY_FROM_ZEROas aliases forNumberFormatter::ROUND_DOWNandNumberFormatter::ROUND_UPto be consistent with the newRoundingModemodes.ResourceBundle::get()now has a tentative return type ofResourceBundle|array|string|int|nullidn_to_ascii()andidn_to_utf8()functions now always throwValueErrorsif the domain name is empty or too long.idn_to_ascii()andidn_to_utf8()functions now always throwValueErrorsif the variant parameter is notINTL_IDNA_VARIANT_UTS46.LDAP:
ldap_connect()with more than 2 arguments is deprecated, useldap_connect_wallet()instead.ldap_exop()with more than 4 arguments is deprecated, useldap_exop_sync()instead.libxml: ✅ (#4051)
Details
libxml_set_streams_context()now immediately throws a TypeError when a non-stream-context resource is passed to the function, instead of throwing later when the stream context is used.MBString:
mb_substr()now interprets character indices in the same manner as most other mbstring functions. This means that character indices returned bymb_strpos()can be passed tomb_substr().mb_substr()now refer to the indices of the Unicode codepoints which are produced when the string is converted to Unicode. This is significant because around 40 SJIS-Mac characters convert to a sequence of multiple Unicode codepoints.MySQLi: ✅
Details
MYSQLI_SET_CHARSET_DIRconstant has been removed ([PHP 8.4] Add removal note to mysqli constants #3960)MYSQLI_STMT_ATTR_PREFETCH_ROWSconstant has been removed ([PHP 8.4] Add removal note to mysqli constants #3960)MYSQLI_CURSOR_TYPE_FOR_UPDATEconstant has been removed ([PHP 8.4] Add removal note to mysqli constants #3960)MYSQLI_CURSOR_TYPE_SCROLLABLEconstant has been removed ([PHP 8.4] Add removal note to mysqli constants #3960)MYSQLI_TYPE_INTERVALconstant has been removed ([PHP 8.4] Add removal note to mysqli constants #3960)mysqli_ping()([PHP 8.4] Add deprecation warning to mysqli functions #3958)mysqli::ping()([PHP 8.4] Add deprecation warning to mysqli functions #3958)mysqli_kill()([PHP 8.4] Add deprecation warning to mysqli functions #3958)mysqli::kill()([PHP 8.4] Add deprecation warning to mysqli functions #3958)mysqli_refresh()([PHP 8.4] Add deprecation warning to mysqli functions #3958)mysqli::refresh()([PHP 8.4] Add deprecation warning to mysqli functions #3958)MYSQLI_REFRESH_*constants ([PHP 8.4] Add deprecation warning to mysqli constants #3959)$modeparameter explicitly tomysqli_store_result()(699e596)MYSQLI_STORE_RESULT_COPY_DATAconstant ([PHP 8.4] Add deprecation warning to mysqli constants #3959)MySQLnd:
2006to4031for MySQL server versions 8.0.24 and above.ODBC
odbc_fetch_object(),odbc_fetch_array(), andodbc_fetch_into()now have a default value ofnull, consistent withodbc_fetch_row(). Previously, the default values were-1,-1, and0, respectively.Opcache:
opcache.interned_strings_buffersetting on 64bit architectures is now32767. Previously it was4095. (Update documentation of opcache.interned_strings_buffer #4061)OpenSSL: ✅
Details
Specifically x25519, ed25519, x448 and ed448 fields are supported in
openssl_pkey_new(),
openssl_pkey_get_details(),
openssl_sign(),
and openssl_verify()
were extended to support those keys. (Document pkey gen params and addition of Curve25519 + Curve448 #4281)
extra_attributesinopenssl_csr_new()sets the CSR attributes instead of subject DN, which incorrectly done previously. (Document 8.4 changes in openssl_csr_new #4315)dninopenssl_csr_new()allows setting an array of values for a single entry. (Document 8.4 changes in openssl_csr_new #4315)serial_hexadded toopenssl_csr_sign()to allow setting serial numbers in the hexadecimal format. (Document serial_hex parameter addition in openssl_csr_sign #4316)openssl_x509_parse()fails if seconds are omitted for OpenSSL version below 3.2 (-1 is returned for such fields). OpenSSL version above 3.3 did not load such certificates already. (Add note about openssl_x509_parse time parsing change in 8.4 #4317)PCNTL:
pcntl_sigprocmask(),pcntl_sigwaitinfo(), andpcntl_sigtimedwait()now always returnfalseon failure, in some cases they would previously return-1.Pcntl\QosClass([PHP 8.4] Pcntl::QosClass #4095, PCNTL: Include new enum into docs #4104)pcntl_getcpupcntl_getcpuaffinitypcntl_getqos_classpcntl_setnspcntl_waitidPCRE:
as well as the (?r) mode modifier. When enabled along with the case-insensitive modifier (i),
the expression locks out mixing of ASCII and non-ASCII characters.
([PHP 8.4] PCRE - PCRE2-v10.44 updates #4078)
PDO:
PDO::connect()(Document new PDO classes and methods #4115)PDO::ATTR_STRINGIFY_FETCHESattribute withPDO::getAttribute().It is now possible to fetch the value of thePDO::PGSQL_ATTR_RESULT_MEMORY_SIZEattribute withPDO::getAttribute().PDO_DBLIB:
DBLIB_ATTR_STRINGIFY_UNIQUEIDENTIFIERandDBLIB_ATTR_DATETIME_CONVERTattributes are now booleans, previously they were int.PDO_FIREBIRD:
ATTR_AUTOCOMMITattribute is now boolean, previously was int.PDO_MYSQL:
ATTR_AUTOCOMMIT,ATTR_EMULATE_PREPARES, andMYSQL_ATTR_DIRECT_QUERYattributes are now booleans, previously they were int.PDO_PGSQL:
??) inside dollar-quoted strings is deprecated.PGSQL:
pg_fetch_result,pg_field_prtlen, andpg_field_is_null()is now deprecated, use an explicit value ofnullfor$rowparameterpg_select()is now optional and accepts an empty array.PDO_SQLITE: ✅
Details
Phar: ✅ (#4050)
Details
Phar::setAlias(),Phar::setDefaultStub()methods now have a tentative return type oftrueinstead ofbool.POSIX: ✅
Details
posix_isatty()now sets the error number when the file descriptor/stream argument is invalid. ([PHP 8.4] posix_isatty update. #4220)Random: ✅
Details
lcg_value()is deprecated in favour of\Random\Randomizer::getFloat()(random:lcg_value()is deprecated #3992)Readline: ✅
Details
.php_historypath through thePHP_HISTFILEenvironment variable. ([PHP 8.4] MentionPHP_HISTFILEenv var #4262)Reflection: ✅
Details
ReflectionMethod::__construct()with one argument is deprecated useReflectionMethod::createFromMethodNameinstead (PHP 8.4: Document reflection changes #4037)ReflectionClassConstant::__toString()andReflectionProperty::__toString()now returns the attached doc comments (PHP-8.4: Reflection behavioural changes #4055, 6d25b8e)ReflectionAttributenow contains a name property to improve the debugging experience (PHP 8.4: Document reflection changes #4037)ReflectionConstant(W.I.P: PHP 8.4: Add ReflectionConstant stubs #4040)ReflectionClassConstant::isDeprecated(DocumentReflectionClassConstant::isDeprecated()#3895)ReflectionGenerator::isClosed(DocumentReflectionGenerator::isClosed()#3896)ReflectionProperty::isDynamic(AddReflectionProperty::isDynamic()#4292)ReflectionClass::newLazyGhost()ReflectionClass::newLazyProxy()ReflectionClass::resetAsLazyGhost()ReflectionClass::resetAsLazyProxy()ReflectionClass::isUninitializedLazyObject()ReflectionClass::initializeLazyObject()ReflectionClass::markLazyObjectAsInitialized()ReflectionClass::getLazyInitializer()ReflectionProperty::skipLazyInitialization()ReflectionProperty::setRawValueWithoutLazyInitialization()ReflectionGenerator::getFunction()may now be called after the generator finished executing. (PHP-8.4: Reflection behavioural changes #4055, 812143d)Session:
session_set_save_handler()with more than 2 arguments is deprecated, use 2 argument signaturesession.sid_lengthINI setting (session:session.sid_lengthandsession.sid_bits_per_characterare deprecated #3993)session.sid_bits_per_characterINI setting (session:session.sid_lengthandsession.sid_bits_per_characterare deprecated #3993)session.use_only_cookiesINI settingsession.use_trans_sidINI settingsession.trans_sid_tagsINI settingsession.trans_sid_hostsINI settingsession.referer_checkINI settingSIDconstantSimpleXML:
SimpleXMLElementnow doesn't implicitly rewind itself.SOAP:
SoapClient::$typemapis now an array instead of a resource, checks usingis_resource()should be converted to check fornullrtld-nowinttoSoapServer::addFunction()SOAP_FUNCTIONS_ALLconstantDateTimeInterfacethat are passed toxsd:datetimeor similar elements are now serialized as such instead of being serialized as an empty string.Soap\UrlSoap\SdlSoapServer::__getLastResponse()(Document SoapServer::__getLastResponse #3877)Sockets: ✅
Details
backlogparameter ofsocket_create_listen()now has a default value ofSOMAXCONN. Previously, it was128. (db22a7c, Add changelog for sockets PHP 8.4 change #4109)Sodium:
sodium_crypto_aead_aes256gcm_*()functions are now available on aarch64 CPUs with the ARM cryptographic extensions.SPL:
SplFixedArray::__wakeup()(Document some SPL changes in PHP-8.4 #4047)SplFileObject::setCsvControl(),SplFileObject::fputcsv(), andSplFileObject::fgetcsv()(PHP 8.4: CSV related changes and deprecations #4093)SplObjectStorage::seek()(PHP 8.4: Document SplObjectStorage::seek() #4048)SplPriorityQueue::insert(),SplPriorityQueue::recoverFromCorruption(),SplHeap::insert(),SplHeap::recoverFromCorruption()methods now have a tentative return type oftrueinstead ofbool. (Document some SPL changes in PHP-8.4 #4047)SplObjectStoragenow implementsSeekableIterator. (Document some SPL changes in PHP-8.4 #4047)SplFixedArraynow throw exceptions of typeOutOfBoundsExceptioninstead ofRuntimeException.Standard:
strcspn()now correctly returns the length of the string if$charactersis the empty string, instead of the length until the first null byte (Add PHP 8.4 changelog entry for strcspn() #3888)http_build_query()now correctly handles backed enums (Document PHP 8.4.0 change to http_build_query in relation to BackedEnums #4988)stream_bucket_make_writeable()andstream_bucket_new()now return an instance ofStreamBucketinstead ofstdClass(PHP 8.4: DocumentStreamBucket#4297)stream_context_set_option()with two arguments, usestream_context_set_options()instead (notice the trailings) (PHP 8.4: stream_context_set_option() 2 param deprecation #4106)fputcsv(),fgetcsv(), andstr_getcsv()(PHP 8.4: CSV related changes and deprecations #4093)unserialize()strings withStagRoundingMode(PHP 8.4: Document RoundingMode #4080)StreamBucket(PHP 8.4: DocumentStreamBucket#4297)http_get_last_response_headers()(PHP-8.4: Document http_(get|clear)_last_response_headers() functions #4034)http_clear_last_response_headers()(PHP-8.4: Document http_(get|clear)_last_response_headers() functions #4034)fpow()(PHP-8.4: Document fpow() #4035)array_all()(Add documentation forarray_findRFC #3465)array_any()(Add documentation forarray_findRFC #3465)array_find()(Add documentation forarray_findRFC #3465)array_find_key()(Add documentation forarray_findRFC #3465)'cost'value for thePASSWORD_BCRYPThashing algorithm forpassword_hash()has been increased from 10 to 12. (password_hash: Update for PHP 8.4 #4455)debug_zval_dump()now indicates whether an array is packed.long2ip()now has a return type ofstringinstead ofstring|false. ([PHP 8.4] Function return type changes #4083)highlight_string()now has a return type ofstring|trueinstead ofstring|bool. ([PHP 8.4] Function return type changes #4083)print_r()now has a return type ofstring|trueinstead ofstring|bool. ([PHP 8.4] Function return type changes #4083)modeparameter of theround()function has been widened toRoundingMode|int, accepting instances of a newRoundingModeenum. (PHP 8.4: Document type widening of mode param of round() #4107)round()behavioural changes (Updateround()for PHP-8.4 and Minor fixes for BCMath's round #4425)Tidy: ✅
Details
tidyNode::getNextSibling()(Document tidyNode::getNextSibling() and tidyNode::getPreviousSibling() #3874)tidyNode::getPreviousSibling()(Document tidyNode::getNextSibling() and tidyNode::getPreviousSibling() #3874)XML: ✅ (#4067)
Details
xml_set_*()functions now check for proper callables, but see related deprecationsxml_set_object()xml_set_*()functionsXSL: ✅
Details
XSLTProcessor::registerPhpFunctions()(PHP 8.4: Document registerPhpFunctions() changes #4114)XSLTProcessor::registerPHPFunctionNS()function (add XSLTProcessor::registerPHPFunctionNS and DOMXPath::registerPhpFunctionNS #4129)XSLTProcessor::$maxTemplateDepthandXSLTProcessor::$maxTemplateVarsto control the recursion depth of XSL template evaluation. (Document XSLTProcessor properties #4041)XSLTProcessor::$cloneDocumentandXSLTProcessor::$doXIncludeare now declared. (Document XSLTProcessor properties #4041)ZIP: ✅
Details
Zlib: ✅
Details
New Functions
BCMath ✅
Details
bcceil(ext/bcmath - Addedbcceil,bcfloor,bcroundandbcdivmod#4132)bcdivmod(ext/bcmath - Addedbcceil,bcfloor,bcroundandbcdivmod#4132)bcfloor(ext/bcmath - Addedbcceil,bcfloor,bcroundandbcdivmod#4132)bcround(ext/bcmath - Addedbcceil,bcfloor,bcroundandbcdivmod#4132)Date
DateTime::createFromTimestampDateTime::getMicrosecondDateTime::setMicrosecondDateTimeImmutable::createFromTimestampDateTimeImmutable::getMicrosecondDateTimeImmutable::setMicrosecondDateTimeInterface::getMicrosecondHash
HashContext::__debugInfoIntl
IntlDateFormatter::getIanaIDintltz_get_iana_idIntlDateFormatter::parseToCalendarSpoofChecker::setAllowedCharsgrapheme_str_split#3974 ([PHP 8.4] Add manual for grapheme_str_split function #3956)MBString ✅
Details
mb_trim([PHP 8.4] Add mb_* functions #3922)mb_ltrim([PHP 8.4] Add mb_* functions #3922)mb_rtrim([PHP 8.4] Add mb_* functions #3922)mb_ucfirst([PHP 8.4] Add mb_* functions #3922)mb_lcfirst([PHP 8.4] Add mb_* functions #3922)Opcache
opcache_jit_blacklistPDO_PGSQL ✅
Pdo\Pgsql::setNoticeCallback(Document new PDO classes and methods #4115)PGSQL
pg_change_passwordpg_jitpg_put_copy_datapg_put_copy_endpg_result_memory_size([PHP 8.4] Add manual forpg_result_memory_size()#3972)pg_set_chunked_rows_sizepg_socket_pollXMLReader ✅ (#4138)
Details
XMLReader::fromStreamXMLReader::fromUriXMLReader::fromStringXMLWriter ✅ (#4138)
Details
XMLWriter::toStreamXMLWriter::toUriXMLWriter::toMemoryNew Classes
BCMath
BcMath\NumberDOM (#4212, #4306)
Dom\HTMLDocumentDom\XMLDocumentODBC
Odbc\ConnectionOdbc\ResultPDO_DBLIB ✅
Pdo\DbLib(Document new PDO classes and methods #4115)PDO_FIREBIRD ✅
Pdo\Firebird(Document new PDO classes and methods #4115)PDO_MYSQL ✅
Pdo\Mysql(Document new PDO classes and methods #4115)PDO_ODBC ✅
Pdo\Odbc(Document new PDO classes and methods #4115)PDO_PGSQL ✅
Pdo\Pgsql(Document new PDO classes and methods #4115)PDO_SQLITE ✅
Pdo\Sqlite(Document new PDO classes and methods #4115)New Constants
cURL ✅
Details
CURL_HTTP_VERSION_3([PHP 8.4] Curl new options and constants #4069)CURL_HTTP_VERSION_3ONLY([PHP 8.4] Curl new options and constants #4069)CURLOPT_TCP_KEEPCNT([PHP 8.4] Curl new options and constants #4069)CURLOPT_PREREQFUNCTION([PHP 8.4] Curl new options and constants #4069)CURL_PREREQFUNC_OK([PHP 8.4] Curl new options and constants #4069)CURL_PREREQFUNC_ABORT([PHP 8.4] Curl new options and constants #4069)CURLOPT_SERVER_RESPONSE_TIMEOUT([PHP 8.4] Curl new options and constants #4069)CURLOPT_DEBUGFUNCTION([PHP 8.4] Curl new options and constants #4069)CURLINFO_TEXT([PHP 8.4] Curl new options and constants #4069)CURLINFO_HEADER_IN([PHP 8.4] Curl new options and constants #4069)CURLINFO_DATA_IN([PHP 8.4] Curl new options and constants #4069)CURLINFO_DATA_OUT([PHP 8.4] Curl new options and constants #4069)CURLINFO_SSL_DATA_OUT([PHP 8.4] Curl new options and constants #4069)CURLINFO_SSL_DATA_IN([PHP 8.4] Curl new options and constants #4069)CURLINFO_POSTTRANSFER_TIME_T([PHP 8.4] Curl new options and constants #4069)Intl
PATTERNPROPERTY_IDS_UNARY_OPERATORPROPERTY_ID_COMPAT_MATH_STARTPROPERTY_ID_COMPAT_MATH_CONTINUELDAP
LDAP_OPT_X_TLS_PROTOCOL_MAXLDAP_OPT_X_TLS_PROTOCOL_TLS1_3libxml ✅
LIBXML_RECOVER(Add libxml constants for PHP 8.4 #3900)LIBXML_NO_XXE(Add libxml constants for PHP 8.4 #3900)MySQLi ✅
MYSQLI_TYPE_VECTOR(PHP 8.4: MYSQLI_TYPE_VECTOR #4065)OpenSSL
X509_PURPOSE_OCSP_HELPERX509_PURPOSE_TIMESTAMP_SIGNPCNTL ✅
Details
SIGCKPT(DragonFlyBSD only) (Pcntl php84 #4073)SIGCKPTEXIT(DragonFlyBSD only) (Pcntl php84 #4073)WEXITEDWSTOPPEDWNOWAITP_ALLP_PIDP_PGIDP_PIDFD(Linux only)P_UID(NetBSD/FreeBSD only)P_GID(NetBSD/FreeBSD only)P_SID(NetBSD/FreeBSD only)P_JAILID(FreeBSD only)PGSQL ✅
PGSQL_TUPLES_CHUNK(PHP 8.4: pgsql: Addpg_set_chunked_rows_size,PGSQL_TUPLES_CHUNK#4117)POSIX ✅
POSIX_SC_CHILD_MAX([PHP 8.4] - Update posix constants. #4072)POSIX_SC_CLK_TCK([PHP 8.4] - Update posix constants. #4072)Sockets ✅
Details
TCP_SYNCNT(Linux only)SO_EXCLBIND(Solaris/Illumos only) ([PHP 8.4] socket update #4210)SO_NOSIGPIPE(macOS and FreeBSD) ([PHP 8.4] socket update #4210)SO_LINGER_SEC(macOS only) ([PHP 8.4] socket update #4210)SO_BINDTOIFINDEX([PHP 8.4] socket update #4210)SO_EXCLUSIVEADDRUSE(Windows only)IP_PORTRANGE(FreeBSD/NetBSD/OpenBSD only) ([PHP 8.4] socket update #4210)IP_PORTRANGE_DEFAULT(FreeBSD/NetBSD/OpenBSD only) ([PHP 8.4] socket update #4210)IP_PORTRANGE_HIGH(FreeBSD/NetBSD/OpenBSD only) ([PHP 8.4] socket update #4210)IP_PORTRANGE_LOW(FreeBSD/NetBSD/OpenBSD only) ([PHP 8.4] socket update #4210)SOCK_NONBLOCK([PHP 8.4] socket update #4210)SOCK_CLOEXEC([PHP 8.4] socket update #4210)SOCK_CONN_DGRAM(NetBSD only) ([PHP 8.4] socket update #4210)SOCK_DCCP(NetBSD only) ([PHP 8.4] socket update #4210)Sodium ✅
Details
SODIUM_CRYPTO_AEAD_AEGIS128L_KEYBYTES([PHP 8.4] Add new Sodium functions and constants #3878)SODIUM_CRYPTO_AEAD_AEGIS128L_NSECBYTES([PHP 8.4] Add new Sodium functions and constants #3878)SODIUM_CRYPTO_AEAD_AEGIS128L_NPUBBYTES([PHP 8.4] Add new Sodium functions and constants #3878)SODIUM_CRYPTO_AEAD_AEGIS128L_ABYTES([PHP 8.4] Add new Sodium functions and constants #3878)SODIUM_CRYPTO_AEAD_AEGIS256_KEYBYTES([PHP 8.4] Add new Sodium functions and constants #3878)SODIUM_CRYPTO_AEAD_AEGIS256_NSECBYTES([PHP 8.4] Add new Sodium functions and constants #3878)SODIUM_CRYPTO_AEAD_AEGIS256_NPUBBYTES([PHP 8.4] Add new Sodium functions and constants #3878)SODIUM_CRYPTO_AEAD_AEGIS256_ABYTES([PHP 8.4] Add new Sodium functions and constants #3878)XML ✅
XML_OPTION_PARSE_HUGE(Document XML_OPTION_PARSE_HUGE #3899)