Php/docs/ds-pair.clear

提供:Dev Guides
< Php
移動先:案内検索

Ds\Pair::clear

(No version information available, might only be in Git)

Ds\Pair::clearRemoves all values


説明

public Ds\Pair::clear ( ) : void

Removes all values from the pair.


パラメータ

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


返り値

値を返しません。


例1 Ds\Pair::clear() example

<?php$pair = new \Ds\Pair("a", 1);print_r($pair);$pair->clear();print_r($pair);?>

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


Ds\Pair Object
(
    [0] => 1
    [1] => 2
    [2] => 3
)
Ds\Pair Object
(
)