From 27cd7a11cb9f0dc9f2a906a659775e221eb87efa Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 7 Jan 2021 10:49:50 +0100 Subject: 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. --- UPGRADING | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'UPGRADING') diff --git a/UPGRADING b/UPGRADING index 29701c3714..3014597868 100644 --- a/UPGRADING +++ b/UPGRADING @@ -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. -- cgit v1.2.1