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

Ds\Map::keys - Returns a set of the map's keys. | JavaScript入門&応用&リファレンスなら「JavaScriptist」

  

Ds\Map::keys

(PECL ds >= 1.0.0)

Ds\Map::keysReturns a set of the map's keys.

説明

public Ds\Set Ds\Map::keys ( void )

Returns a set containing all the keys of the map, in the same order.

パラメータ

この関数にはパラメータはありません。

返り値

A Ds\Set containing all the keys of the map.

例1 Ds\Map::keys() example

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

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

object(Ds\Set)#2 (3) {
  [0]=>
  string(1) "a"
  [1]=>
  string(1) "b"
  [2]=>
  string(1) "c"
}

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

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