PHP 8.6.0RC7 available for testing

CachingIterator::offsetUnset

(PHP 5 >= 5.2.0, PHP 7, PHP 8)

CachingIterator::offsetUnset — Remove an element from the cache

Beschreibung

public function CachingIterator::offsetUnset(string $key): void

Removes the element stored under key from the cache. This method is called when unset() is used on the CachingIterator with array syntax, such as unset($iterator['key']). The inner iterator is not modified.

The CachingIterator::FULL_CACHE flag must be set.

Parameter-Liste

key

The key of the element to be removed.

Rückgabewerte

Es wird kein Wert zurückgegeben.

Fehler/Exceptions

Throws a BadMethodCallException if the CachingIterator::FULL_CACHE flag is not set.

Siehe auch

+add a note

User Contributed Notes

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