zip
Note
This is a point-in-time snapshot of the API documentation from January 2026. Going forward, we will not be maintaining a public copy of these references, and recommend users to refer to the built-in signature helpers available in the Hack LSP instead for complete and up-to-date information.
Returns a Map where each value is a Pair that combines the value
of the current Map and the provided Traversable
public function zip<Tu>(
Traversable<Tu> $traversable,
): Map<Tk, Pair<Tv, Tu>>;
If the number of values of the current Map are not equal to the number
of elements in the Traversable, then only the combined elements up to
and including the final element of the one with the least number of
elements is included.
The keys associated with the current Map remain unchanged in the
returned Map.