File tree Expand file tree Collapse file tree
reference/array/functions Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313 <methodparam rep =" repeat" ><type >array</type ><parameter >replacements</parameter ></methodparam >
1414 </methodsynopsis >
1515 <para >
16- <function >array_replace</function > replaces the values of
17- <parameter >array</parameter > with values having the same keys in each of the following
18- arrays. If a key from the first array exists in the second array, its value
19- will be replaced by the value from the second array. If the key exists in the
20- second array, and not the first, it will be created in the first array.
21- If a key only exists in the first array, it will be left as is.
22- If several arrays are passed for replacement, they will be processed
23- in order, the later arrays overwriting the previous values.
16+ <function >array_replace</function > is not mutating
2417 </para >
2518 <para >
26- <function >array_replace</function > is not recursive : it will replace
27- values in the first array by whatever type is in the second array.
19+ <function >array_replace</function > is not recursive
20+ </para >
21+ <para >
22+ <function >array_replace</function > creates a new array by joining all given arrays in given order, replacing values of already existing keys.
2823 </para >
2924 </refsect1 >
3025 <refsect1 role =" parameters" >
You can’t perform that action at this time.
0 commit comments