php[world] 2017

Ds\Queue::toArray

(PECL ds >= 1.0.0)

Ds\Queue::toArray Converts the queue to an tableau.

Description

public array Ds\Queue::toArray ( void )

Converts the queue to an tableau.

Note:

Casting to an tableau is not supported yet.

Note:

This method is not destructive.

Liste de paramètres

Cette fonction ne contient aucun paramètre.

Valeurs de retour

An tableau containing all the values in the same order as the queue.

Exemples

Exemple #1 Ds\Queue::toArray() example

<?php
$queue 
= new \Ds\Queue([123]);

var_dump($queue->toArray());
?>

L'exemple ci-dessus va afficher quelque chose de similaire à :

array(3) {
  [0]=>
  int(1)
  [1]=>
  int(2)
  [2]=>
  int(3)
}
add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top