Other Changes

- « Deprecated Features

- Windows Support »

- PHP Manual
- Migrating from PHP 8.1.x to PHP 8.2.x
- Other Changes

## Other Changes

### Core changes

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'`.

### Changes in SAPI Modules

#### CLI

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.

### Changed Functions

#### Core

The strcmp(), strcasecmp(), strncmp(), strncasecmp(), and substr_compare() functions, using binary safe string comparison is no longer guaranteed to return `strlen($string1) - strlen($string2)` when string lengths are not equal, but may now return `-1` or `1` instead. Instead of depending on any concrete value, the return value should be compared to `0`.

#### DBA

dba_open() and dba_popen() now have the following enforced signature:

dba_open(
string `$path`,
string `$mode`,
?string `$handler` = `null`,
int `$permission` = 0644,
int `$map_size` = 0,
?int `$flags` = `null`
): resource|false

dba_fetch()'s optional skip argument is now at the end in line with PHP userland semantics. Its signature is now:

dba_fetch(string|array `$key`, resource `$handle`, int `$skip`): string|false
The overloaded signature:
dba_fetch(string|array `$key`, int `$skip`, resource `$handle`): string|false
is still accepted, but it is recommended to use the new standard variant.

#### Random

random_bytes() and random_int() now throw a \Random\RandomException on CSPRNG failures. Previously a plain \Exception was thrown instead.

#### SPL

The `iterator` parameter of iterator_to_array() and iterator_count() is widened to iterable from Iterator, allowing arrays to be passed.

### Other Changes to Extensions

#### Date

The properties of DatePeriod are now properly declared.

#### Intl

Instances of IntlBreakIterator, IntlRuleBasedBreakIterator, IntlCodePointBreakIterator, IntlPartsIterator, 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.

#### MySQLi

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:

- The reconnect property of mysqli_driver
- The mysqli.reconnect INI directive
- The `MYSQLI_IS_MARIADB` constant has been deprecated

#### OCI8

The minimum Oracle Client library version required is now 11.2.

#### PCRE

NUL characters (`\0`) in pattern strings are now supported.

#### Session

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

sqlite3.defensive is now `INI_USER`.

#### Standard

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.

#### Tidy

The properties of the tidy class are now properly declared. And those of the tidyNode class are now properly declared as readonly.

#### Zip

The Zip extension has been updated to version 1.20.0, which adds the following methods:

- ZipArchive::clearError()
- ZipArchive::getStreamName()
- ZipArchive::getStreamIndex()

### Changes to INI File Handling

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:

- bcmath.scale
- com.code_page
- default_socket_timeout
- fiber.stack_size
- hard_timeout
- intl.error_level
- ldap.max_links
- max_input_nesting_level
- max_input_vars
- mbstring.regex_retry_limit
- mbstring.regex_stack_limit
- mysqli.allow_local_infile
- mysqli.allow_persistent
- mysqli.default_port
- mysqli.max_links
- mysqli.max_persistent
- mysqli.rollback_on_cached_plink
- mysqlnd.log_mask
- mysqlnd.mempool_default_size
- mysqlnd.net_read_buffer_size
- mysqlnd.net_read_timeout
- oci8.default_prefetch
- oci8.max_persistent
- oci8.persistent_timeout
- oci8.ping_interval
- oci8.prefetch_lob_size
- oci8.privileged_connect
- oci8.statement_cache_size
- odbc.allow_persistent
- odbc.check_persistent
- odbc.max_persistent
- odbc.max_links
- odbc.defaultbinmode
- odbc.default_cursortype
- odbc.defaultlrl
- opcache.consistency_checks
- opcache.file_update_protection
- opcache.force_restart_timeout
- opcache.interned_strings_buffer
- opcache.jit_bisect_limit
- opcache.jit_blacklist_root_trace
- opcache.jit_blacklist_side_trace
- opcache.jit_debug
- opcache.jit_hot_func
- opcache.jit_hot_loop
- opcache.jit_hot_return
- opcache.jit_hot_side_exit
- opcache.jit_max_exit_counters
- opcache.jit_max_loop_unrolls
- opcache.jit_max_polymorphic_calls
- opcache.jit_max_recursive_calls
- opcache.jit_max_recursive_returns
- opcache.jit_max_root_traces
- opcache.jit_max_side_traces
- opcache.log_verbosity_level
- opcache.max_file_size
- opcache.opt_debug_level
- opcache.optimization_level
- opcache.revalidate_freq
- output_buffering
- pcre.backtrack_limit
- pcre.recursion_limit
- pgsql.max_links
- pgsql.max_persistent
- post_max_size
- realpath_cache_size
- realpath_cache_ttl
- session.cache_expire
- session.cookie_lifetime
- session.gc_divisor
- session.gc_maxlifetime
- session.gc_probability
- soap.wsdl_cache_limit
- soap.wsdl_cache_ttl
- unserialize_max_depth
- upload_max_filesize
- user_ini.cache_ttl
- xmlrpc_error_number
- zend.assertions
- zlib.output_compression_level