From 6955e476301cefa54ca1fb4a32693eda719c8997 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dennis=20Weiersh=C3=A4user?= Date: Fri, 18 Mar 2022 17:45:34 +0100 Subject: [PATCH] Fixed and simplified array_replace description --- reference/array/functions/array-replace.xml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/reference/array/functions/array-replace.xml b/reference/array/functions/array-replace.xml index 67549459a1ec..7acf65342d3b 100644 --- a/reference/array/functions/array-replace.xml +++ b/reference/array/functions/array-replace.xml @@ -13,18 +13,13 @@ arrayreplacements - array_replace replaces the values of - array with values having the same keys in each of the following - arrays. If a key from the first array exists in the second array, its value - will be replaced by the value from the second array. If the key exists in the - second array, and not the first, it will be created in the first array. - If a key only exists in the first array, it will be left as is. - If several arrays are passed for replacement, they will be processed - in order, the later arrays overwriting the previous values. + array_replace is not mutating - array_replace is not recursive : it will replace - values in the first array by whatever type is in the second array. + array_replace is not recursive + + + array_replace creates a new array by joining all given arrays in given order, replacing values of already existing keys.