PHPマニュアル/PEARマニュアル | ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot

Ds\Map::hasKey - Determines whether the map contains a given key. | JavaScript入門&応用&リファレンスなら「JavaScriptist」

  

Ds\Map::hasKey

(PECL ds >= 1.0.0)

Ds\Map::hasKeyDetermines whether the map contains a given key.

説明

public bool Ds\Map::hasKey ( mixed $key )

Determines whether the map contains a given 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
?>

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

bool(true)
bool(false)

忘却曲線を使ってこの知識を確実に記憶に残す

フォーラムで「Ds\Map::hasKey - Determines whether the map contains a given key.」について話す
各種マニュアル: PHPマニュアル | PEARマニュアル | Smarty(英語)マニュアル | PHP-GTKマニュアル | Ds\Map::hasKey - Determines whether the map contains a given key.」をGoogle検索
copyright © 1997-2024 PHP ドキュメント作成グループ(ライセンス). provided by php spot. マニュアル: