蝦米
93592ea743
Fix GH-9769: Misleading error message for unpacking of objects
...
Only arrays can be unpacked in constant expressions.
Closes GH-9776.
2022-12-02 13:10:59 +01:00
Nikita Popov
f555544faf
Fix incorrect access of AST_UNPACK
...
list_is_keyed() did not take into account that there may be
AST_UNPACK elements. These would error lateron anyway, but still
produce an invalid access here.
2021-10-12 17:16:58 +02:00
Nikita Popov
260d2acdb4
Fix memory leak in array unpack with refcounted numeric string key
2021-09-14 12:14:12 +02:00
Javier Eguiluz
ffc8717401
Fix some typos ( #7320 )
2021-07-31 08:34:57 +02:00
Nikita Popov
27cd7a11cb
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.
2021-02-09 10:04:27 +01:00
Máté Kocsis
7aacc705d0
Add many missing closing PHP tags to tests
...
Closes GH-5958
2020-08-09 22:03:36 +02:00
Máté Kocsis
d30cd7d7e7
Review the usage of apostrophes in error messages
...
Closes GH-5590
2020-07-10 21:05:28 +02:00
Máté Kocsis
36935e42ea
Improve undefined variable error messages
...
Closes GH-5312
2020-03-31 13:02:32 +02:00
Nikita Popov
f8d795820e
Reindent phpt files
2020-02-03 22:52:20 +01:00
Nikita Popov
2f92957fd3
Convert some notices to warnings
...
Part of https://wiki.php.net/rfc/engine_warnings .
2019-10-02 10:34:08 +02:00
Nikita Popov
f2b09969db
Convert "cannot add element" warning to exception
2019-09-27 13:00:07 +02:00
Peter Kokot
63e43e19ea
Convert CRLF to LF
2019-05-14 02:59:06 +02:00
CHU Zhaowei
e829d08729
Implement spread operator in arrays
...
RFC: https://wiki.php.net/rfc/spread_operator_for_array
Closes GH-3640.
2019-05-13 14:42:43 +02:00