The iterable type is now a built-in compile time alias for
array|Traversable.
Error messages relating to iterable
will therefore
now use array|Traversable
.
Type Reflection is preserved for single iterable
(and ?iterable
) to produce a
ReflectionNamedType with name iterable
,
however usage of iterable
in union types will be
converted to array|Traversable
.
The date format of sent cookies is now 'D, d M Y H:i:s \G\M\T'
;
previously it was 'D, d-M-Y H:i:s T'
.
The STDOUT, STDERR and STDIN streams are no longer closed on resource destruction which is mostly when the CLI finishes. It is however still possible to explicitly close those streams using fclose() and similar.
The strcmp(), strcasecmp(),
strncmp(), strncasecmp(), and
substr_compare() functions, using binary safe string
comparison now return -1
, 0
and 1
.
dba_open() and dba_popen() now have the following enforced signature:
$path
,$mode
,$handler
= null
,$permission
= 0644,$map_size
= 0,$flags
= null
dba_fetch()'s optional skip argument is now at the end in line with PHP userland semantics. Its signature is now:
The overloaded signature: is still accepted, but it is recommended to use the new standard variant.random_bytes() and random_int() now throw a \Random\RandomException on CSPRNG failures. Previously a plain \Exception was thrown instead.
The iterator
parameter of
iterator_to_array() and iterator_count()
is widened to iterable from Iterator,
allowing arrays to be passed.
The properties of DatePeriod are now properly declared.
Instances of IntlBreakIterator, IntlRuleBasedBreakIterator, IntlCodePointBreakIterator, IntlPartsIterator, IntlCalendar, IntlCalendar, Collator, IntlIterator, UConverter, IntlDateFormatter, IntlDatePatternGenerator, MessageFormatter, ResourceBundle, Spoofchecker, IntlTimeZone, and Transliterator are no longer serializable. Previously, they could be serialized, but unserialization yielded unusable objects or failed.
The support for libmysql has been removed and it is no longer possible to compile mysqli with libmysql. From now on, the mysqli extension can be compiled only with mysqlnd. All libmysql features unavailable in mysqlnd have been removed:
MYSQLI_IS_MARIADB
constant has been deprecatedThe minimum Oracle Client library version required is now 11.2.
NUL characters (\0
) in pattern strings are now supported.
Trying to change the session.cookie_samesite INI directive while the session is active or output has already been sent will now fail and emit a warning. This aligns the behaviour with all other session INI settings.
sqlite3.defensive
is now PHP_INI_USER
.
getimagesize() now reports the actual image dimensions, bits and channels of AVIF images. Previously, the dimensions have been reported as 0x0, and bits and channels have not been reported at all.
The properties of the tidy class are now properly declared. And those of the tidyNode class are now properly declared as readonly.
The Zip extension has been updated to version 1.20.0, which adds the following methods:
Support for binary (0b
/0B
) and octal
(0o
/0O
) prefixes has been added to integer INI settings.
Integer INI settings that start with a zero (0
)
continue to be interpreted as an octal integer.
Parsing of some ill-formatted values will now trigger a warning when this was silently ignored before. For backwards compatibility, interpretation of these values has not changed. This affects the following settings: