Nikita Popov
73ab7b30ca
Allow array_diff() and array_intersect() with single array argument
...
Both of these functions are well-defined when used with a single
array argument -- rejecting this case was an artificial limitation.
This is not useful when called with explicit arguments, but removes
edge-cases when used with argument unpacking:
// OK even if $excludes is empty.
array_diff($array, ...$excludes);
// OK even if $arrays contains a single array only.
array_intersect(...$arrays);
This matches the behavior of functions like array_merge() and
array_push(), which also allow calls with no array or a single
array respectively.
Closes GH-6097.
2020-09-09 11:03:17 +02:00
..
2020-08-09 22:03:36 +02:00
2020-09-07 18:58:11 +02:00
2020-09-07 21:35:48 +03:00
2020-09-01 16:35:56 +02:00
2020-09-01 16:35:56 +02:00
2020-09-08 15:23:23 +02:00
2020-09-09 10:47:43 +02:00
2020-08-03 00:45:51 +02:00
2020-09-09 10:47:43 +02:00
2020-08-24 17:37:20 +02:00
2020-09-08 15:23:23 +02:00
2020-09-01 16:35:56 +02:00
2020-09-09 10:47:43 +02:00
2020-08-24 17:34:32 +02:00
2020-09-07 11:05:07 +02:00
2020-09-08 15:23:23 +02:00
2020-08-09 22:03:36 +02:00
2020-08-09 22:03:36 +02:00
2020-09-08 15:23:23 +02:00
2020-09-07 21:35:48 +03:00
2020-09-09 10:47:43 +02:00
2020-09-09 10:47:43 +02:00
2020-09-09 10:47:43 +02:00
2020-09-04 15:26:16 +02:00
2020-09-03 15:07:03 +02:00
2020-09-08 20:09:45 +02:00
2020-09-09 10:47:43 +02:00
2020-09-01 12:25:38 +02:00
2020-09-09 10:47:43 +02:00
2020-09-02 11:11:38 +02:00
2020-09-09 10:47:43 +02:00
2020-09-09 10:47:43 +02:00
2020-08-28 15:41:27 +02:00
2020-09-09 10:47:43 +02:00
2020-09-01 16:35:56 +02:00
2020-08-01 10:07:05 +02:00
2020-08-01 10:07:05 +02:00
2020-09-09 10:47:43 +02:00
2020-09-09 10:47:43 +02:00
2020-08-09 22:03:36 +02:00
2020-08-31 11:08:26 +02:00
2020-08-31 11:08:26 +02:00
2020-08-26 12:59:43 +02:00
2020-09-09 10:47:43 +02:00
2020-08-24 17:34:33 +02:00
2020-09-07 19:02:02 +02:00
2020-09-06 10:40:26 -04:00
2020-09-09 10:47:43 +02:00
2020-09-09 10:47:43 +02:00
2020-08-25 13:09:23 +02:00
2020-09-07 19:02:02 +02:00
2020-07-06 21:13:34 +02:00
2020-09-09 10:47:43 +02:00
2020-09-09 10:47:43 +02:00
2020-09-09 10:47:43 +02:00
2020-09-09 10:47:43 +02:00
2020-09-09 10:47:43 +02:00
2020-09-09 10:47:43 +02:00
2020-09-09 11:03:17 +02:00
2020-08-07 12:35:30 +02:00
2020-07-06 21:13:34 +02:00
2020-09-03 17:43:57 +02:00
2020-09-07 19:02:02 +02:00
2020-09-02 20:26:50 +02:00
2020-09-02 11:11:38 +02:00
2020-08-25 11:54:45 +02:00
2020-09-07 19:02:02 +02:00
2020-09-09 10:47:43 +02:00
2020-09-03 07:03:12 -06:00
2020-09-02 11:11:38 +02:00
2020-09-07 18:58:11 +02:00
2020-07-06 21:13:34 +02:00