PHP 7.4.0RC6 Released!

Ds\Set::remove

(PECL ds >= 1.0.0)

Ds\Set::removeRemoves all given values from the set

Descrierea

public Ds\Set::remove ([ mixed $...values ] ) : void

Removes all given values from the set, ignoring any that are not in the set.

Parametri

values

The values to remove.

Valorile întoarse

Nu este întoarsă nici o valoare.

Exemple

Example #1 Ds\Set::remove() example

<?php
$set 
= new \Ds\Set([12345]);

$set->remove(1);            // Remove 1
$set->remove(12);         // Can't find 1, but remove 2
$set->remove(...[34]);    // Remove 3 and 4

var_dump($set);
?>

Exemplul de mai sus va afișa ceva similar cu:

object(Ds\Set)#1 (1) {
  [0]=>
  int(5)
}
add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top