|
Ds\Map::intersectCreates a new map by intersecting keys with another map 説明
public Ds\Map Ds\Map::intersect(Ds\Map
$map )
Creates a new map containing the pairs of the current instance whose keys
are also present in the given
パラメータ
戻り値
The key intersection of the current instance and another 例例1 Ds\Map::intersect example
上の例の出力は、 たとえば以下のようになります。 object(Ds\Map)#3 (2) { [0]=> object(Ds\Pair)#4 (2) { ["key"]=> string(1) "b" ["value"]=> int(2) } [1]=> object(Ds\Pair)#5 (2) { ["key"]=> string(1) "c" ["value"]=> int(3) } } |