PHP Ds\Queue toArray() Function
The Ds\Queue::toArray() Function in PHP is used to convert a Queue into an associative array in PHP. The values of the Queue are assigned to the array in the same order as they are present in the Queue.
array public Ds\Queue::toArray ( void )
Parameters: This function does not accepts any parameters.
Return Value: This function converts the Queue into an associative array and returns the array.
Below program illustrate the Ds\Queue::toArray() Function in PHP:
The equivalent array is: Array (  => One  => 1  => Two  => 2  => Three  => 3 )