(PECL ds >= 1.0.0)
Ds\Set::clear — 移除所有值
此函数没有参数。
不返回值。
示例 #1 Ds\Set::clear() 示例
<?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
(
)