Open
Description
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:
- PCRE changes
Important
Priority should be given to documenting Core language and ext/standard behavioural changes
Core
New features: ✅
- Property Hooks (Partial PHP 8.4: Document reflection changes #4037, Hooks documentation #4094)
- Asymmetric Property Visibility (Asymmetric Visiblity and Final properties #3828)
- Lazy Objects (Document lazy objects #3975)
-
#[\Deprecated]
attribute (Document#[\Deprecated]
#3894) -
request_parse_body()
Parsing RFC1867 (multipart) requests in non-POST HTTP requests (Create stub for request_parse_body() #4108) -
new
without parenthesis (Add documentation for new MyClass()->method() without parentheses #3978) - Improved debugging info output for WeakReferences ([PHP 8.4] Update
WeakReference::__debugInfo()
changelog #4256) - Improved debugging info output for Closures ([PHP 8.4] Update
Closure::__debugInfo()
changelog #4257) -
Defining Identical Symbols in Different Namespace BlocksThis is more of a bugfix than anything else
Deprecated: ✅
- Implicitly nullable parameter (Mention deprecation of implicit nullable types in function docs #4008)
- Raising zero to the power of negative number (PHP 8.4: Raising 0 to a negative exponent is deprecated #4102)
- Using underscore
_
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_STRICT
constant (Use modern markup for E_* constants #4056)
BC Break:
-
exit()
behavioural changes (PHP 8.4: exit() is now a function #4070) - Recursion during comparison
- Indirect Modification of readonly Properties
- Temporary Filename Length
-
Removal ofThis is an internal engine changeE_STRICT
error level
New 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 oftrue
instead ofbool
now (PHP 8.4: trigger_error() updates #4063)
Other Changes:
- Closures names
- Fibers (Document changes related to Fibers and destructors #4060)
- Fiber switching during destructor execution is now allowed.
- Destructors may now be executed in a separate Fiber
- GC triggered in Fiber behavioural change
- Output Handlers
- Output handler status flags are now cleared (Document ob_start() change #4350)
-
output_add_rewrite_var()
now usesurl_rewriter.hosts
INI (Document output_add_rewrite_var() url_rewriter.hosts bugfix #4351)
SAPI
apache2handler:
- Support for EOL Apache 2.0 and 2.2 has been removed. Minimum required Apache version is now 2.4.
FPM:
- Flushing headers without a body will now succeed. (PHP 8.4: Flushing headers without a body will now succeed #4122)
- Status page has a new field to display a memory peak. (Document FPM memory peak status field #4335)
- The
/dev/poll
events.mechanism
setting for Solaris/Illumos had been retired. (noted in Fix FPM event mechanism poll typo and improve it #4334)
CLI:
- 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.
Class constants are now typed
- ext/date ([PHP 8.4] Add
ext-date
constant types #4237) - ext/intl ([PHP 8.4] Add
ext-intl
constant types #4238) - ext/pdo ([PHP 8.4] Mention class constant types in
PDO
changelog #4243) - ext/reflection ([PHP 8.4] Add class constant types for
Reflection
#4244) - ext/spl
- ext/sqlite
- ext/xmlreader (PHP 8.4: Add changelog entry for typed constants in XMLReader #4139)
New warnings and exceptions
cURL: ✅
-
curl_multi_select()
now throws aValueError
if$timeout
is 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 aValueError
if$quality
is invalid ([PHP 8.4] Add errors for GD functions #3962) -
imageavif()
now throw aValueError
if$speed
is invalid ([PHP 8.4] Add errors for GD functions #3962) -
imagescale()
now throw aValueError
if$mode
is invalid ([PHP 8.4] Add errors for GD functions #3962) -
imagescale()
now throw aValueError
if$width
or$height
over/underflows ([PHP 8.4] Add errors for GD functions #3962) -
imagefilter()
now throw aValueError
with theIMG_FILTER_SCATTER
filter if$sub
or$plus
over/underflows ([PHP 8.4] Add errors for GD functions #3962)
GetText: ✅
-
bind_textdomain_codeset()
,textdomain()
,d*gettext()
now throw aValueError
if$domain
is the empty string ([PHP 8.4] Add errors for GetText functions #3964)
Intl: ✅
-
resourcebundle_get()
,ResourceBundle::get()
, and offset access forResourceBundle
-
TypeError
for invalid offset types -
ValueError
for an empty string -
ValueError
if the integer index does not fit in a signed 32 bit integer
-
-
IntlDateFormatter::__construct()
now throws aValueError
if$locale
is invalid -
NumberFormatter::__construct()
now throws aValueError
if$locale
is invalid
MBstring: ✅ (#4245)
-
mb_encode_numericentity()
,mb_decode_numericentity()
now check that$map
only has integers -
mb_http_input()
throwsValueError
if$type
is invalid -
mb_http_output()
throwsValueError
if$encoding
has null bytes
ODBC: ✅
-
odbc_fetch_row()
returnsfalse
when$row =< 0
, this now warns ([PHP 8.4]odbc_fetch_row()
can emit aE_WARNING
#4258)
PCNTL: ✅ (#4208)
-
pcntl_sigprocmask()
,pcntl_sigwaitinfo()
, andpcntl_sigtimedwait
-
ValueError
if$signals
array is empty -
TypeError
if$signals
array value is not int -
ValueError
if$signals
array value is not valid signal
-
-
pcntl_sigprocmask()
-
ValueError
if$mode
is not one ofSIG_BLOCK
,SIG_UNBLOCK
orSIG_SETMASK
-
-
pcntl_sigtimedwait()
-
ValueError
if$seconds
is less than 0 -
ValueError
if$nanoseconds
is less than 0 -
ValueError
if$seconds
and$nanoseconds
are both 0
-
SimpleXML: ✅
-
simplexml_import_dom()
throwsTypeError
instead ofValueError
if called with non XML object (Update simplexml_import_dom for PHP 8.4 #3906)
Standard: ✅
-
round()
now throws aValueError
for invalid$mode
, before interpreted asPHP_ROUND_HALF_UP
([PHP 8.4]round()
can throw aValueError
#4259) -
php_uname()
now throws aValueError
for invalid$mode
#3968 -
ValueError
andValueError
are thrown if the"allowed_classes"
option ofunserialize()
is not an array of class names ([PHP 8.4]unserialize()
can throw aValueError
andTypeError
#4260) -
str_getcsv()
(PHP 8.4: CSV related changes and deprecations #4093)-
ValueError
if$separator
is not one byte long -
ValueError
if$enclosure
is not one byte long -
ValueError
if$escape
is not one byte long or the empty string
-
XMLReader: ✅ (#4123)
-
XMLReader::open()
throwsValueError
if$encoding
is invalid / has nulls -
XMLReader::XML()
throwsValueError
if$encoding
is invalid / has nulls
XMLWriter: ✅ (#4123)
- Passing an encoding that contain null bytes now throws a
ValueError
XSL: ✅
- Failure to call a PHP function callback during evaluation now throws instead of emitting a warning. (Document errors and changes in 8.4 for XSL and XPath #4483)
-
XSLTProcessor::importStyleSheet()
throwsTypeError
instead ofValueError
if 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\Connection
-
Odbc\Result
Soap:
-
Soap\Url
-
Soap\Sdl
Removed extensions ✅ (#4103)
- ext/imap
- ext/pspell
- ext/oci8
- ext/pdo_oci
Extensions
cURL: ✅
- Deprecated:
-
CURLOPT_BINARYTRANSFER
constant (Update CURLOPT constant descriptions #3818)
-
- Other Changes:
- The minimum libcurl version required is now 7.61.0 ([PHP 8.4] Curl new options and constants #4069)
-
CURLOPT_DNS_USE_GLOBAL_CACHE
constant has no effect ([PHP 8.4] Curl new options and constants #4069)
- New Features:
-
curl_version()
returns an additionalfeature_list
value, which is an associative array of all known cURL features ([PHP 8.4] Curl new options and constants #4069) - Added
CURL_HTTP_VERSION_3
andCURL_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_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) - 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 additionalposttransfer_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 passingCURLINFO_POSTTRANSFER_TIME_T
to thecurl_getinfo()
option parameter. This requires libcurl 8.10.0 or later ([PHP 8.4] Curl new options and constants #4069)
-
Date: ✅
- Deprecated:
- The
DatePeriod::__construct(string $isostr, int $options = 0)
signature is now deprecated.
UseDatePeriod::createFromISO8601String()
instead. (7d81260) - The
SUNFUNCS_RET_TIMESTAMP
,SUNFUNCS_RET_STRING
, andSUNFUNCS_RET_DOUBLE
constants are now deprecated. (SUNFUNCS_* constants are deprecated as of PHP 8.4.0 #4006)
- The
DBA: ✅
- Deprecated:
- Passing
null
orfalse
todba_key_split()
is now deprecated. It would always returnfalse
in those cases. (dba_key_split() deprecation #4007)
- Passing
- New Classes
-
Dba\Connection
([PHP 8.4] DBA resource to Object conversions #3914)
-
DOM: ✅
- BC Break:
- Some DOM methods previously returned
false
or aPHP_ERR
DOMException
if a new node could not be allocated. They now consistently throw anINVALID_STATE_ERR
DOMException
. (Skipped as this is rare and can be documented as part ofPHP_ERR
deprecation.) -
DOMImplementation::createDocument()
now has a tentative return type ofDOMDocument
(Document DOMImplementation::createDocument() change for PHP 8.4 #3901) - No longer possible to clone
DOMXPath
objects (Document clone behaviour of DOMXPath #3925) -
DOMImplementation::getFeature()
has been removed
- Some DOM methods previously returned
- Deprecated: (PHP 8.4: Document DOM deprecations #4113)
- The
DOM_PHP_ERR
constant is now deprecated. - The
DOMDocument::$actualEncoding
property is now formally deprecated. - The
DOMDocument::$config
property is now formally deprecated. - The
DOMEntity::$actualEncoding
property is now formally deprecated. - The
DOMEntity::$encoding
property is now formally deprecated. - The
DOMEntity::$version
property is now formally deprecated.
- The
- New Methods:
- Added the
DOMNode::compareDocumentPosition()
with its associated constants: (Document compareDocumentPosition & related constants #4081)-
DOMNode::DOCUMENT_POSITION_DISCONNECTED
-
DOMNode::DOCUMENT_POSITION_PRECEDING
-
DOMNode::DOCUMENT_POSITION_FOLLOWING
-
DOMNode::DOCUMENT_POSITION_CONTAINS
-
DOMNode::DOCUMENT_POSITION_CONTAINED_BY
-
DOMNode::DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
-
-
DOMXPath::registerPhpFunctionNS()
(add XSLTProcessor::registerPHPFunctionNS and DOMXPath::registerPhpFunctionNS #4129) -
DOMXPath::quote()
(Document DOMXPath::quote() #3909)
- Added the
- Other changes:
-
DOMDocument::registerNodeClass()
now has a tentative return type oftrue
instead ofbool
(Document tentative return type change for DOMDocument::registerNodeClass() #4082)
-
GMP:
- BC Break:
-
GMP
is now final (gmp: GMP is marked final #3990)
-
- Other Changes:
- Now possible to cast
GMP
tobool
, before was aE_RECOVERABLE_ERROR
- Now possible to cast
Hash: ✅ (#4137)
- Deprecated:
- Passing invalid options to hash functions is now deprecated.
- Other changes:
-
hash_update()
now has a tentative return type oftrue
instead ofbool
-
Intl:
- Deprecated: ([PHP 8.4] intl update part 2 #4207)
- Calling
intlcal_set()
orIntlCalendar::set()
with more than 2 arguments is deprecated, useIntlCalendar::setDate()
orIntlCalendar::setDateTime()
instead. - Calling
intlgregcal_create_instance()
orIntlGregorianCalendar::__construct()
with more than 2 arguments is deprecated, useIntlGregorianCalendar::createFromDate()
orIntlGregorianCalendar::createFromDateTime()
instead.
- Calling
- New Features: ([PHP 8.4] intl update part 2 #4207)
- Added the
NumberFormatter::ROUND_HALFODD
to complement the existingNumberFormatter::ROUND_HALFEVEN
functionality. - Added
NumberFormatter::ROUND_TOWARD_ZERO
andNumberFormatter::ROUND_AWAY_FROM_ZERO
as aliases forNumberFormatter::ROUND_DOWN
andNumberFormatter::ROUND_UP
to be consistent with the newRoundingMode
modes.
- Added the
- Other changes:
-
ResourceBundle::get()
now has a tentative return type ofResourceBundle|array|string|int|null
- The
idn_to_ascii()
andidn_to_utf8()
functions now always throwValueErrors
if the domain name is empty or too long. - The
idn_to_ascii()
andidn_to_utf8()
functions now always throwValueErrors
if the variant parameter is notINTL_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.
-
LDAP:
- Deprecated: (PHP-8.4: LDAP changes #4066)
- Calling
ldap_connect()
with more than 2 arguments is deprecated, useldap_connect_wallet()
instead. - Calling
ldap_exop()
with more than 4 arguments is deprecated, useldap_exop_sync()
instead.
- Calling
libxml: ✅ (#4051)
- Other changes:
- 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 bymb_strpos()
can be passed tomb_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.
- On invalid strings (those with encoding errors),
- 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.
MySQLi: ✅
- BC Break:
-
MYSQLI_SET_CHARSET_DIR
constant has been removed ([PHP 8.4] Add removal note to mysqli constants #3960) -
MYSQLI_STMT_ATTR_PREFETCH_ROWS
constant has been removed ([PHP 8.4] Add removal note to mysqli constants #3960) -
MYSQLI_CURSOR_TYPE_FOR_UPDATE
constant has been removed ([PHP 8.4] Add removal note to mysqli constants #3960) -
MYSQLI_CURSOR_TYPE_SCROLLABLE
constant has been removed ([PHP 8.4] Add removal note to mysqli constants #3960) -
MYSQLI_TYPE_INTERVAL
constant has been removed ([PHP 8.4] Add removal note to mysqli constants #3960)
-
- Deprecated:
-
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) - All
MYSQLI_REFRESH_*
constants ([PHP 8.4] Add deprecation warning to mysqli constants #3959) - Passing the
$mode
parameter explicitly tomysqli_store_result()
(699e596) -
MYSQLI_STORE_RESULT_COPY_DATA
constant ([PHP 8.4] Add deprecation warning to mysqli constants #3959)
-
MySQLnd:
- BC Break:
- The error code reported for MySQL server wait timeouts has been changed from
2006
to4031
for MySQL server versions 8.0.24 and above.
- The error code reported for MySQL server wait timeouts has been changed from
- Other changes:
- Support for the new VECTOR data type from MySQL 9.
ODBC
- Other changes:
- The row of
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.
- The row of
Opcache:
- BC Break:
- The maximum value of the
opcache.interned_strings_buffer
setting on 64bit architectures is now32767
. Previously it was4095
. (Update documentation of opcache.interned_strings_buffer #4061) - JIT Changes:
- Default Config
- Fatal Error on initialization failure
- The maximum value of the
OpenSSL: ✅
- New Features:
- Implement PASSWORD_ARGON2 password hashing. Requires OpenSSL 3.2 and NTS build (Document argon2 installation with OpenSSL in PHP 8.4 #4272)
- Added support for Curve25519 + Curve448 based keys.
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)
- Other changes:
- The
extra_attributes
inopenssl_csr_new()
sets the CSR attributes instead of subject DN, which incorrectly done previously. (Document 8.4 changes in openssl_csr_new #4315) - The
dn
inopenssl_csr_new()
allows setting an array of values for a single entry. (Document 8.4 changes in openssl_csr_new #4315) - New
serial_hex
added toopenssl_csr_sign()
to allow setting serial numbers in the hexadecimal format. (Document serial_hex parameter addition in openssl_csr_sign #4316) - 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 minimum OpenSSL version required is now 1.1.1. (Update requirements for minimal OpenSSL version #4318)
- The
PCNTL:
- BC Break:
-
pcntl_sigprocmask()
,pcntl_sigwaitinfo()
, andpcntl_sigtimedwait()
now always returnfalse
on failure, in some cases they would previously return-1
.
-
- New Enum:
-
Pcntl\QosClass
([PHP 8.4] Pcntl::QosClass #4095, PCNTL: Include new enum into docs #4104)
-
- New functions:
-
pcntl_getcpu
-
pcntl_getcpuaffinity
-
pcntl_getqos_class
-
pcntl_setns
-
pcntl_waitid
-
PCRE:
- TODO all changes related to lib update
- BC Break:
- 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)
PDO:
- New Features
- Subclasses and
PDO::connect()
(Document new PDO classes and methods #4115) - Added a custom parser supporting:
- single and double-quoted literals, with doubling as escaping mechanism
- two-dashes and non-nested C-style comments
- Subclasses and
- Other changes:
- It is now possible to fetch the value of the
PDO::ATTR_STRINGIFY_FETCHES
attribute withPDO::getAttribute()
. -
It is now possible to fetch the value of thePDO::PGSQL_ATTR_RESULT_MEMORY_SIZE
attribute withPDO::getAttribute()
.
- It is now possible to fetch the value of the
PDO_DBLIB:
- BC Break:
- The
DBLIB_ATTR_STRINGIFY_UNIQUEIDENTIFIER
andDBLIB_ATTR_DATETIME_CONVERT
attributes are now booleans, previously they were int.
- The
PDO_FIREBIRD:
- BC Break:
- The
ATTR_AUTOCOMMIT
attribute is now boolean, previously was int. - The extension now requires a C++ compiler and fbclient 3.0 or higher
- The
PDO_MYSQL:
- BC Break:
- The
ATTR_AUTOCOMMIT
,ATTR_EMULATE_PREPARES
, andMYSQL_ATTR_DIRECT_QUERY
attributes are now booleans, previously they were int.
- The
- New Features
- Added a custom parser supporting: (Document new PDO classes and methods #4115)
- single and double-quoted literals, with doubling and backslash as escaping mechanism
- backtick literal identifiers and with doubling as escaping mechanism
- two dashes followed by at least 1 whitespace, non-nested C-style comments, and hash-comments
- Added a custom parser supporting: (Document new PDO classes and methods #4115)
PDO_PGSQL:
- BC Break:
- The DSN's credentials, when set, are given priority over their PDO constructor counterparts, being closer to the documentation states.
- Deprecated:
- Using escaped question marks (
??
) inside dollar-quoted strings is deprecated.
- Using escaped question marks (
- New Features
- Added a custom parser supporting: (Document new PDO classes and methods #4115)
- single and double-quoted literals, with doubling as escaping mechanism
- C-style "escape" string literals (E'string')
- dollar-quoted string literals
- two-dashes and C-style comments (non-nested)
- support for ?? as escape sequence for the ? operator
- Added a custom parser supporting: (Document new PDO classes and methods #4115)
- Other changes:
- The minimum libpq version required is now 10.0.
PGSQL:
- Deprecated:
- 2 argument signature of
pg_fetch_result
,pg_field_prtlen
, andpg_field_is_null()
is now deprecated, use an explicit value ofnull
for$row
parameter
- 2 argument signature of
- Other changes:
- The conditions parameter of
pg_select()
is now optional and accepts an empty array. - The minimum libpq version required is now 10.0.
- The conditions parameter of
PDO_SQLITE: ✅
- New Features
- Added a custom parser supporting: (Document new PDO classes and methods #4115)
- single, double-quoted, and backtick literals, with doubling as escaping mechanism
- square brackets quoting for identifiers
- two-dashes and C-style comments (non-nested)
- Added a custom parser supporting: (Document new PDO classes and methods #4115)
Phar: ✅ (#4050)
- New Features
- Added support for the Unix timestamp extension for Zip archives.
- Other changes:
- The
Phar::setAlias()
,Phar::setDefaultStub()
methods now have a tentative return type oftrue
instead ofbool
.
- The
POSIX: ✅
- Other changes:
-
posix_isatty()
now sets the error number when the file descriptor/stream argument is invalid. ([PHP 8.4] posix_isatty update. #4220)
-
Random: ✅
- Deprecated:
-
lcg_value()
is deprecated in favour of\Random\Randomizer::getFloat()
(random:lcg_value()
is deprecated #3992)
-
Readline: ✅
- New Features
- Added ability to change the
.php_history
path through thePHP_HISTFILE
environment variable. ([PHP 8.4] MentionPHP_HISTFILE
env var #4262)
- Added ability to change the
Reflection: ✅
- Deprecated:
-
ReflectionMethod::__construct()
with one argument is deprecated useReflectionMethod::createFromMethodName
instead (PHP 8.4: Document reflection changes #4037)
-
- New Features
-
ReflectionClassConstant::__toString()
andReflectionProperty::__toString()
now returns the attached doc comments (PHP-8.4: Reflection behavioural changes #4055, 6d25b8e) -
ReflectionAttribute
now contains a name property to improve the debugging experience (PHP 8.4: Document reflection changes #4037)
-
- New Classes
-
ReflectionConstant
(W.I.P: PHP 8.4: Add ReflectionConstant stubs #4040)
-
- New Methods
-
ReflectionClassConstant::isDeprecated
(DocumentReflectionClassConstant::isDeprecated()
#3895) -
ReflectionGenerator::isClosed
(DocumentReflectionGenerator::isClosed()
#3896) -
ReflectionProperty::isDynamic
(AddReflectionProperty::isDynamic()
#4292) - Lazy Object related: (Document lazy objects #3975)
-
ReflectionClass::newLazyGhost()
-
ReflectionClass::newLazyProxy()
-
ReflectionClass::resetAsLazyGhost()
-
ReflectionClass::resetAsLazyProxy()
-
ReflectionClass::isUninitializedLazyObject()
-
ReflectionClass::initializeLazyObject()
-
ReflectionClass::markLazyObjectAsInitialized()
-
ReflectionClass::getLazyInitializer()
-
ReflectionProperty::skipLazyInitialization()
-
ReflectionProperty::setRawValueWithoutLazyInitialization()
-
-
- Other changes:
-
ReflectionGenerator::getFunction()
may now be called after the generator finished executing. (PHP-8.4: Reflection behavioural changes #4055, 812143d)
-
Session:
- Deprecated:
-
session_set_save_handler()
with more than 2 arguments is deprecated, use 2 argument signature - Changing the value of the
session.sid_length
INI setting (session:session.sid_length
andsession.sid_bits_per_character
are deprecated #3993) - Changing the value of the
session.sid_bits_per_character
INI setting (session:session.sid_length
andsession.sid_bits_per_character
are deprecated #3993) - 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 usingis_resource()
should be converted to check fornull
- Optional dependency on ext/session which has issues with
rtld-now
-
- Deprecated:
- Passing an
int
toSoapServer::addFunction()
-
SOAP_FUNCTIONS_ALL
constant
- Passing an
- 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 toxsd:datetime
or similar elements are now serialized as such instead of being serialized as an empty string.
- New Classes
-
Soap\Url
-
Soap\Sdl
-
- New Methods
-
SoapServer::__getLastResponse()
(Document SoapServer::__getLastResponse #3877)
-
Sockets: ✅
- Other changes:
- The
backlog
parameter ofsocket_create_listen()
now has a default value ofSOMAXCONN
. Previously, it was128
. (db22a7c, Add changelog for sockets PHP 8.4 change #4109)
- The
Sodium:
- Other changes:
- The
sodium_crypto_aead_aes256gcm_*()
functions are now available on aarch64 CPUs with the ARM cryptographic extensions.
- The
SPL:
- Deprecated:
-
SplFixedArray::__wakeup()
(Document some SPL changes in PHP-8.4 #4047) - Escape CSV arg for
SplFileObject::setCsvControl()
,SplFileObject::fputcsv()
, andSplFileObject::fgetcsv()
(PHP 8.4: CSV related changes and deprecations #4093)
-
- New Methods
-
SplObjectStorage::seek()
(PHP 8.4: Document SplObjectStorage::seek() #4048)
-
- Other changes:
- The
SplPriorityQueue::insert()
,SplPriorityQueue::recoverFromCorruption()
,SplHeap::insert()
,SplHeap::recoverFromCorruption()
methods now have a tentative return type oftrue
instead ofbool
. (Document some SPL changes in PHP-8.4 #4047) -
SplObjectStorage
now implementsSeekableIterator
. (Document some SPL changes in PHP-8.4 #4047) - Out of bounds accesses in
SplFixedArray
now throw exceptions of typeOutOfBoundsException
instead ofRuntimeException
.
- The
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) -
http_build_query()
now correctly handles backed enums -
stream_bucket_make_writeable()
andstream_bucket_new()
now return an instance ofStreamBucket
instead ofstdClass
(PHP 8.4: DocumentStreamBucket
#4297)
-
- Deprecated:
-
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) - Escape CSV arg for
fputcsv()
,fgetcsv()
, andstr_getcsv()
(PHP 8.4: CSV related changes and deprecations #4093) -
unserialize()
strings withS
tag
-
- New Classes and Enum
-
RoundingMode
(PHP 8.4: Document RoundingMode #4080) -
StreamBucket
(PHP 8.4: DocumentStreamBucket
#4297)
-
- New functions
-
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_find
RFC #3465) -
array_any()
(Add documentation forarray_find
RFC #3465) -
array_find()
(Add documentation forarray_find
RFC #3465) -
array_find_key()
(Add documentation forarray_find
RFC #3465)
-
- Other changes:
- The default
'cost'
value for thePASSWORD_BCRYPT
hashing 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 ofstring
instead ofstring|false
. ([PHP 8.4] Function return type changes #4083) -
highlight_string()
now has a return type ofstring|true
instead ofstring|bool
. ([PHP 8.4] Function return type changes #4083) -
print_r()
now has a return type ofstring|true
instead ofstring|bool
. ([PHP 8.4] Function return type changes #4083) - The
mode
parameter of theround()
function has been widened toRoundingMode|int
, accepting instances of a newRoundingMode
enum. (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)
- The default
Tidy: ✅
- BC Break:
- Failures in the constructor now throw exceptions rather than emitting warnings and having a broken object. (Document tidy constructor changes in PHP 8.4 #3907)
- New Methods
-
tidyNode::getNextSibling()
(Document tidyNode::getNextSibling() and tidyNode::getPreviousSibling() #3874) -
tidyNode::getPreviousSibling()
(Document tidyNode::getNextSibling() and tidyNode::getPreviousSibling() #3874)
-
XML: ✅ (#4067)
- BC Break:
- The
xml_set_*()
functions now check for proper callables, but see related deprecations
- The
- Deprecated:
-
xml_set_object()
- Passing non-callable strings to
xml_set_*()
functions
-
XSL: ✅
- New Features
- It is now possible to use parameters that contain both single and double quotes. (Document XSLTProcessor::setParameter() quote fix #4038)
- It is now possible to pass any callable to
XSLTProcessor::registerPhpFunctions()
(PHP 8.4: Document registerPhpFunctions() changes #4114) - New related
XSLTProcessor::registerPHPFunctionNS()
function (add XSLTProcessor::registerPHPFunctionNS and DOMXPath::registerPhpFunctionNS #4129) - Added
XSLTProcessor::$maxTemplateDepth
andXSLTProcessor::$maxTemplateVars
to control the recursion depth of XSL template evaluation. (Document XSLTProcessor properties #4041)
- Other changes:
- The typed properties
XSLTProcessor::$cloneDocument
andXSLTProcessor::$doXInclude
are now declared. (Document XSLTProcessor properties #4041)
- The typed properties
ZIP: ✅
- New Features
- Added the ZipArchive::ER_TRUNCATED_ZIP constant, which was added in libzip 1.11. (add Zip::ER_TRUNCATED_ZIP #3799)
Zlib: ✅
- Other changes:
- The minimum zlib version required is now 1.2.11. (PHP 8.4: Update Zlib lib requirement #4105)
New Functions
BCMath ✅
-
bcceil
(ext/bcmath - Addedbcceil
,bcfloor
,bcround
andbcdivmod
#4132) -
bcdivmod
(ext/bcmath - Addedbcceil
,bcfloor
,bcround
andbcdivmod
#4132) -
bcfloor
(ext/bcmath - Addedbcceil
,bcfloor
,bcround
andbcdivmod
#4132) -
bcround
(ext/bcmath - Addedbcceil
,bcfloor
,bcround
andbcdivmod
#4132)
Date
-
DateTime::createFromTimestamp
-
DateTime::getMicrosecond
-
DateTime::setMicrosecond
-
DateTimeImmutable::createFromTimestamp
-
DateTimeImmutable::getMicrosecond
-
DateTimeImmutable::setMicrosecond
Hash
-
HashContext::__debugInfo
Intl
-
IntlDateFormatter::getIanaID
-
intltz_get_iana_id
-
IntlDateFormatter::parseToCalendar
-
SpoofChecker::setAllowedChars
-
grapheme_str_split
#3974 ([PHP 8.4] Add manual for grapheme_str_split function #3956)
MBString ✅
-
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_blacklist
PDO_PGSQL ✅
-
Pdo\Pgsql::setNoticeCallback
(Document new PDO classes and methods #4115)
PGSQL
-
pg_change_password
-
pg_jit
-
pg_put_copy_data
-
pg_put_copy_end
-
pg_result_memory_size
([PHP 8.4] Add manual forpg_result_memory_size()
#3972) -
pg_set_chunked_rows_size
-
pg_socket_poll
XMLReader ✅ (#4138)
-
XMLReader::fromStream
-
XMLReader::fromUri
-
XMLReader::fromString
XMLWriter ✅ (#4138)
-
XMLWriter::toStream
-
XMLWriter::toUri
-
XMLWriter::toMemory
New Classes
BCMath
-
BcMath\Number
DOM (#4212, #4306)
-
Dom\HTMLDocument
-
Dom\XMLDocument
- New Dom\Node classes?
ODBC
-
Odbc\Connection
-
Odbc\Result
PDO_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 ✅
-
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
-
PATTERN
-
PROPERTY_IDS_UNARY_OPERATOR
-
PROPERTY_ID_COMPAT_MATH_START
-
PROPERTY_ID_COMPAT_MATH_CONTINUE
LDAP
-
LDAP_OPT_X_TLS_PROTOCOL_MAX
-
LDAP_OPT_X_TLS_PROTOCOL_TLS1_3
libxml ✅
-
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_HELPER
-
X509_PURPOSE_TIMESTAMP_SIGN
PCNTL ✅
-
SIGCKPT
(DragonFlyBSD only) (Pcntl php84 #4073) -
SIGCKPTEXIT
(DragonFlyBSD only) (Pcntl php84 #4073) -
WEXITED
-
WSTOPPED
-
WNOWAIT
-
P_ALL
-
P_PID
-
P_PGID
-
P_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 ✅
-
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 ✅
-
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)