Reference

Guide

A::merge()

Merges arrays recursively

A::merge(array $array1, array $array2, bool $mode = 1): array

Parameters

Name Type Default Description
$array1 array
$array2 array
$mode bool 1

Behavior for elements with numeric keys;
A::MERGE_APPEND: elements are appended, keys are reset;
A::MERGE_OVERWRITE: elements are overwritten, keys are preserved
A::MERGE_REPLACE: non-associative arrays are completely replaced

Return type

array

Source code

kirby/src/Toolkit/A.php#L141