The SplObjectStorage::setInfo() function is an inbuilt function in PHP which is used to set the data associated with the current iterator entry.
void SplObjectStorage::setInfo( $val )
Parameters: This function accepts a single parameter $val which specifies the data to be associate to the current iterator entry of the storage.
Return Value: This function does not return any value.
Below programs illustrate the SplObjectStorage::setInfo() function in PHP:
string(17) "Modified_GFG_DATA" string(17) "Modified_GFG_DATA" string(17) "Modified_GFG_DATA"
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.