Ds\Map::hasValue

Determines whether the map contains a given value

説明

public bool Ds\Map::hasValue(mixed $value)

Determines whether the map contains a given value.

パラメータ

value

The value to look for.

戻り値

Returns true if the value could found, false otherwise.

例1 Ds\Map::hasValue example

<?php
$map 
= new \Ds\Map(["a" => 1"b" => 2"c" => 3]);

var_dump($map->hasValue(1)); // true
var_dump($map->hasValue(4)); // false
?>

上の例の出力は、 たとえば以下のようになります。

bool(true)
bool(false)