Ds\Set::remove
PHP function
Edit on GitHub ✎
(PECL ds >= 1.0.0)
Removes all given values from the set
Description
Ds\Set::remove(mixed ...$values): void
Removes all given values from the set, ignoring any that are not in the set.
Parameters
valuesThe values to remove.
Return Values
Void
Examples
Ds\Set::remove() example
php
<?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);
?>The above example will output something similar to:
output
object(Ds\Set)#1 (1) {
[0]=>
int(5)
}