public function merge(array $array, $recursively = false)
    {
        if (true === $recursively) {
            return new static(array_merge_recursive($this->elements, $array));
        }

        return new static(array_merge($this->elements, $array));
    }
public function merge(array $array, $recursively = false)
    {
        if (true === $recursively) {
            return new static(array_merge_recursive($this->elements, $array));
        }

        return new static(array_merge($this->elements, $array));
    }
public function merge ( array $ array , $ recursively = false ) { if ( true === $ recursively ) { return new static ( array_merge_recursive ( $ this -> elements , $ array ) ) ; } return new static ( array_merge ( $ this -> elements , $ array ) ) ; }
Merge the current array with the provided one. The latter array is overwriting.

@param array $array Array to merge with (overwrites)
@param bool $recursively Whether array will be merged recursively or no

@return ArrayImitator A new array with the keys/values from $array added
Merge the current array with the provided one . The latter array is overwriting .