The SplObjectStorage::removeAll() function is an inbuilt function in PHP which is used to remove all objects contained in another storage from the current storage.
void SplObjectStorage::removeAll( $obj )
Parameters: This function accepts a single parameter $obj which specify the storage to be removed from the current storage.
Return Value: This function does not return any value.
Below programs illustrate the SplObjectStorage::removeAll() function in PHP:
int(2) int(1) int(0)
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.