Search Results
SplObjectStorage::rewind (PHP 5 >= 5.1.0, PHP 7, PHP 8) SplObjectStorage::rewind — Rewind the iterator to the first storage element
Jun 23, 2023 · The SplObjectStorage::rewind () function is an inbuilt function in PHP which is used to rewind the iterator to the first storage element. Syntax: void SplObjectStorage::rewind() Parameters: This function does not accept any parameter. Return Value: This function does not return any value. Below programs illustrate the S plObjectStorage::rewind () function in PHP: Program 1:
SplObjectStorage::rewind — Rewind the iterator to the first storage element
Simple usage example of `SplObjectStorage::rewind ()`. The SplObjectStorage::rewind function is used to reset the iterator of a SplObjectStorage object to the first element in the collection. This allows you to traverse through the collection from the beginning.
Mar 19, 2026 · The SplObjectStorage class provides a map from objects to data or, by ignoring data, an object set. This dual purpose can be useful in many cases involving the need to uniquely identify objects.
SplObjectStorage::removeAllExcept — Removes all objects except for those contained in another storage from the current storage SplObjectStorage::rewind — Rewind the iterator to the first storage element SplObjectStorage::serialize — Serializes the storage SplObjectStorage::setInfo — Sets the data associated with the current iterator entry
PHP Manual Function Reference Other Basic Extensions SPL Datastructures SplObjectStorage
