The Ds\Queue::capacity() Function in PHP is used to check the current capacity of a Queue instance.
int public Ds\Queue::capacity ( void )
Parameters: This function does not accepts any parameters.
Return Value: This function returns the current capacity of the Queue instance.
Below programs illustrate the Ds\Queue::capacity() function in PHP:
Current Capacity is: int(8) Current Capacity is: int(8) int(128)
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.