diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2021-01-07 10:49:50 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2021-02-09 10:04:27 +0100 |
commit | 27cd7a11cb9f0dc9f2a906a659775e221eb87efa (patch) | |
tree | bbde3f2bf36779cb5fdda40b39fc6ab95aaf3a8a /UPGRADING | |
parent | 3fbd3d2e2f105aa1cb4790af536ca807724fbed0 (diff) | |
download | php-git-27cd7a11cb9f0dc9f2a906a659775e221eb87efa.tar.gz |
Add support for string keys in array unpacking
This adds support for:
$array1 = ['a' => 1, 'b' => 2];
$array2 = ['b' => 3, 'c' => 4];
$array = [...$array1, ...$array2];
// => ['a' => 1, 'b' => 3, 'c' => 4]
RFC: https://wiki.php.net/rfc/array_unpacking_string_keys
Closes GH-6584.
Diffstat (limited to 'UPGRADING')
-rw-r--r-- | UPGRADING | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -82,8 +82,11 @@ PHP 8.1 UPGRADE NOTES - Core: . It is now possible to specify octal integer by using the explicit "0o"/"0O" - prefix similar to hexadecimal ("0x"/"0X) and binary ("0b"/"0B") integer literals + prefix similar to hexadecimal ("0x"/"0X) and binary ("0b"/"0B") integer + literals. RFC: https://wiki.php.net/rfc/explicit_octal_notation + . Added support for array unpacking with strings keys. + RFC: https://wiki.php.net/rfc/array_unpacking_string_keys - Curl: . Added CURLOPT_DOH_URL option. |