Search Results
SplObjectStorage::offsetGet (PHP 5 >= 5.3.0, PHP 7, PHP 8) SplObjectStorage::offsetGet — Returns the data associated with an object
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.
Jun 23, 2023 · The SplObjectStorage::offsetGet () function is an inbuilt function in PHP that is used to get the data associated with the object.
offsetExists () — Checks whether an object exists in the storage offsetGet () — Returns the data associated with an object offsetSet () — Associates data to an object in the storage offsetUnset () — Removes an object from the storage removeAll () — Removes objects contained in another storage from the current storage
See Also SplObjectStorage::offsetSet - Associates data to an object in the storage SplObjectStorage::offsetExists - Checks whether an object exists in the storage SplObjectStorage::offsetUnset - Removes an object from the storage
SplObjectStorage::offsetGet () can become EXTREMELY slow depending on the associated data (PHP 5.6).
People also ask
What does SplObjectStorage return?
Why is SplObjectStorage so slow?
How fast is SplObjectStorage in PHP7?
Does SplObjectStorage break object lookup in a cloned instance?
SplObjectStorage::next — Move to the next entry SplObjectStorage::offsetExists — Checks whether an object exists in the storage SplObjectStorage::offsetGet — Returns the data associated with an object SplObjectStorage::offsetSet — Associates data to an object in the storage SplObjectStorage::offsetUnset — Removes an object from the ...
