The Ds\Deque::clear() function is an inbuilt function in PHP which is used to clear the Deque by removing all elements from the Deque.
public Ds\Deque::clear( void ) : void
Parameters: This function does not accepts any parameter.
Return Value: This function does not return any Value.
Below programs illustrate the Ds\Deque::clear() function in PHP:
Elements in the deck: Ds\Deque Object (  => 1  => 2  => 3  => 4  => 5  => 6 ) Ds\Deque Object ( )
Elements in the Deque Ds\Deque Object (  => geeks  => for  => geeks ) Alter clearing the elements Ds\Deque Object ( )
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.