We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Set::delete()
1 parent 0b81b20 commit 97d670bCopy full SHA for 97d670b
docs/Set.md
@@ -6,6 +6,7 @@ The Set object holds only unique values of any type.
6
7
- [`Set() constructor`](#new-set)
8
- [`Set::add()`](#setadd)
9
+- [`Set::delete()`](#setdelete)
10
- [`Set::has()`](#sethas)
11
12
## Constructor
@@ -52,6 +53,20 @@ $set->add(40)->add('second');
52
53
// [40, 'first', 'second']
54
```
55
56
+### Set::delete()
57
+
58
+The `delete()` method removes a specified value from the Set.
59
60
+```php
61
+$set = new Set(['foo', 'bar']);
62
63
+$set->delete('foo');
64
+// true
65
66
+$set->delete(1);
67
+// false
68
+```
69
70
### Set::has()
71
72
The `has()` method returns `TRUE` when element with the specified value exists in the `Set` or `FALSE` if it does not exist.
0 commit comments