(PECL ds >= 1.0.0)
Ds\Set::clear — Removes all values
この関数にはパラメータはありません。
値を返しません。
例1 Ds\Set::clear() example
<?php
$set = new \Ds\Set([1, 2, 3]);
print_r($set);
$set->clear();
print_r($set);
?>上の例の出力は、 たとえば以下のようになります。
Ds\Set Object
(
[0] => 1
[1] => 2
[2] => 3
)
Ds\Set Object
(
)