The Set class2024-03-28T10:02:10+00:00tag:php.net,2009-10-13:/manual/en/file/class.ds-setPhDPHP Documentation GroupDs\Set::add -- Adds values to the set2024-03-28T10:02:10+00:00tag:php.net,2009-10-13:/manual/en/ds-set.addDs\Set::allocate -- Allocates enough memory for a required capacity2024-03-28T10:02:10+00:00tag:php.net,2009-10-13:/manual/en/ds-set.allocateDs\Set::capacity -- Returns the current capacity2024-03-28T10:02:10+00:00tag:php.net,2009-10-13:/manual/en/ds-set.capacityDs\Set::clear -- Removes all values2024-03-28T10:02:10+00:00tag:php.net,2009-10-13:/manual/en/ds-set.clearDs\Set::__construct -- Creates a new instance2024-03-28T10:02:10+00:00tag:php.net,2009-10-13:/manual/en/ds-set.constructDs\Set::contains -- Determines if the set contains all values2024-03-28T10:02:10+00:00tag:php.net,2009-10-13:/manual/en/ds-set.containsDs\Set::copy -- Returns a shallow copy of the set2024-03-28T10:02:10+00:00tag:php.net,2009-10-13:/manual/en/ds-set.copyDs\Set::count -- Returns the number of values in the set2024-03-28T10:02:10+00:00tag:php.net,2009-10-13:/manual/en/ds-set.countDs\Set::diff -- Creates a new set using values that aren't in another set2024-03-28T10:02:10+00:00tag:php.net,2009-10-13:/manual/en/ds-set.diffDs\Set::filter -- Creates a new set using a callable to
determine which values to include2024-03-28T10:02:10+00:00tag:php.net,2009-10-13:/manual/en/ds-set.filterDs\Set::first -- Returns the first value in the set2024-03-28T10:02:10+00:00tag:php.net,2009-10-13:/manual/en/ds-set.firstDs\Set::get -- Returns the value at a given index2024-03-28T10:02:10+00:00tag:php.net,2009-10-13:/manual/en/ds-set.getDs\Set::intersect -- Creates a new set by intersecting values with another set2024-03-28T10:02:10+00:00tag:php.net,2009-10-13:/manual/en/ds-set.intersectDs\Set::isEmpty -- Returns whether the set is empty2024-03-28T10:02:10+00:00tag:php.net,2009-10-13:/manual/en/ds-set.isemptyDs\Set::join -- Joins all values together as a string2024-03-28T10:02:10+00:00tag:php.net,2009-10-13:/manual/en/ds-set.joinDs\Set::jsonSerialize -- Returns a representation that can be converted to JSON2024-03-28T10:02:10+00:00tag:php.net,2009-10-13:/manual/en/ds-set.jsonserializeDs\Set::last -- Returns the last value in the set2024-03-28T10:02:10+00:00tag:php.net,2009-10-13:/manual/en/ds-set.lastDs\Set::merge -- Returns the result of adding all given values to the set2024-03-28T10:02:10+00:00tag:php.net,2009-10-13:/manual/en/ds-set.mergeDs\Set::reduce -- Reduces the set to a single value using a callback function2024-03-28T10:02:10+00:00tag:php.net,2009-10-13:/manual/en/ds-set.reduceDs\Set::remove -- Removes all given values from the set2024-03-28T10:02:10+00:00tag:php.net,2009-10-13:/manual/en/ds-set.removeDs\Set::reverse -- Reverses the set in-place2024-03-28T10:02:10+00:00tag:php.net,2009-10-13:/manual/en/ds-set.reverseDs\Set::reversed -- Returns a reversed copy2024-03-28T10:02:10+00:00tag:php.net,2009-10-13:/manual/en/ds-set.reversedDs\Set::slice -- Returns a sub-set of a given range2024-03-28T10:02:10+00:00tag:php.net,2009-10-13:/manual/en/ds-set.sliceDs\Set::sort -- Sorts the set in-place2024-03-28T10:02:10+00:00tag:php.net,2009-10-13:/manual/en/ds-set.sortDs\Set::sorted -- Returns a sorted copy2024-03-28T10:02:10+00:00tag:php.net,2009-10-13:/manual/en/ds-set.sortedDs\Set::sum -- Returns the sum of all values in the set2024-03-28T10:02:10+00:00tag:php.net,2009-10-13:/manual/en/ds-set.sumDs\Set::toArray -- Converts the set to an array2024-03-28T10:02:10+00:00tag:php.net,2009-10-13:/manual/en/ds-set.toarrayDs\Set::union -- Creates a new set using values from the current instance and another set2024-03-28T10:02:10+00:00tag:php.net,2009-10-13:/manual/en/ds-set.unionDs\Set::xor -- Creates a new set using values in either the current instance or in another set, but not in both2024-03-28T10:02:10+00:00tag:php.net,2009-10-13:/manual/en/ds-set.xor