Ds\Set::remove
(PECL ds >= 1.0.0)
Ds\Set::remove — Removes all given values from the set
说明
Removes all given values
from the set, ignoring any that are not in the set.
参数
values
-
The values to remove.
返回值
没有返回值。
示例
示例 #1 Ds\Set::remove() example
<?php
$set = new \Ds\Set([1, 2, 3, 4, 5]);
$set->remove(1); // Remove 1
$set->remove(1, 2); // Can't find 1, but remove 2
$set->remove(...[3, 4]); // Remove 3 and 4
var_dump($set);
?>
以上示例的输出类似于:
object(Ds\Set)#1 (1) { [0]=> int(5) }
+添加备注
用户贡献的备注
此页面尚无用户贡献的备注。