(No version information available, might only be in Git)
A Set is a sequence of unique values. This implementation uses the same hash table as Ds\Map, where values are used as keys and the mapped value is ignored.
public add ( mixed ...$values ) : void
public allocate ( int $capacity ) : void
public capacity ( ) : int
public clear ( ) : void
public contains ( mixed ...$values ) : bool
public copy ( ) : Ds\Set
public diff ( Ds\Set $set ) : Ds\Set
public filter ([ callable $callback ] ) : Ds\Set
public first ( ) : mixed
public get ( int $index ) : mixed
public intersect ( Ds\Set $set ) : Ds\Set
public isEmpty ( ) : bool
public join ([ string $glue ] ) : string
public last ( ) : mixed
public merge ( mixed $values ) : Ds\Set
public reduce ( callable $callback [, mixed $initial ] ) : mixed
public remove ( mixed ...$values ) : void
public reverse ( ) : void
public reversed ( ) : Ds\Set
public slice ( int $index [, int $length ] ) : Ds\Set
public sort ([ callable $comparator ] ) : void
public sorted ([ callable $comparator ] ) : Ds\Set
public sum ( ) : int|float
public toArray ( ) : array
public union ( Ds\Set $set ) : Ds\Set
public xor ( Ds\Set $set ) : Ds\Set}
Ds\Set::MIN_CAPACITY
Version | Description |
---|---|
PECL ds 1.3.0 | The class now implements ArrayAccess. |
© 1997–2020 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/class.ds-set.php