Ds\Map::hasKey
Determines whether the map contains a given key
説明
public bool Ds\Map::hasKey(mixed $key
)
パラメータ
-
key
-
The key to look for.
戻り値
Returns true
if the key could found, false
otherwise.
例
例1 Ds\Map::hasKey example
<?php
$map = new \Ds\Map(["a" => 1, "b" => 2, "c" => 3]);
var_dump($map->hasKey("a")); // true
var_dump($map->hasKey("e")); // false
?>