From 893894794a15dbdd59c522d741be71269c82f060 Mon Sep 17 00:00:00 2001 From: Simon Asika Date: Wed, 8 Nov 2023 19:46:44 +0800 Subject: [PATCH] Add Arr::merge() --- packages/utilities/src/Arr.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/utilities/src/Arr.php b/packages/utilities/src/Arr.php index cb77366d4..336a1a6c0 100644 --- a/packages/utilities/src/Arr.php +++ b/packages/utilities/src/Arr.php @@ -832,6 +832,18 @@ public static function mapRecursive( return $result; } + /** + * A simple merge proxy to avoid resources greedy construction. + * + * @param ...$args + * + * @return array + */ + public static function merge(...$args): array + { + return array_merge(...$args); + } + /** * Merge array recursively. *