The Ds\Deque::join() function is an inbuilt function in PHP which is used to join all values in the Deque as a string. The separator can also be used to join the elements.
public Ds\Deque::join( $glue ) : string
Parameters: This function accepts single parameter $glue which holds the separator to separate Deque elements.
Return Value: This function returns all values of the Deque joined as a string.
Below programs illustrate the Ds\Deque::join() function in PHP:
Original Deque Ds\Deque Object (  => 1  => 2  => 3  => 4  => 5  => 6 ) String form: string(11) "1|2|3|4|5|6"
Original Deque Ds\Deque Object (  => Geeks  => for  => Geeks ) String form: string(13) "GeeksforGeeks"