(PECL ds >= 1.0.0)
Ds\Map::union — Creates a new map using values from the current instance and another map
public Ds\Map::union ( Ds\Map $map ) : Ds\Map
Creates a new map that contains the pairs of the current instance as well as the pairs of another map
.
A ∪ B = {x: x ∈ A ∨ x ∈ B}
Note:
Values of the current instance will be overwritten by those provided where keys are equal.
map
The other map, to combine with the current instance.
A new map containing all the pairs of the current instance as well as another map
.
© 1997–2020 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/ds-map.union.php