The Ds\Set::last() function is an inbuilt function in PHP which is used to return the last element from the Set instance.
void public Ds\Set::last( void )
Parameter: This function does not accept any parameter.
Return Value: This function returns the last value of the Set.
Below programs illustrate the Ds\Set::last() function in PHP:
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.