array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'uk', ), 'this' => array ( 0 => 'ds-deque.toarray.php', 1 => 'Ds\\Deque::toArray', 2 => 'Converts the deque to an array', ), 'up' => array ( 0 => 'class.ds-deque.php', 1 => 'Ds\\Deque', ), 'prev' => array ( 0 => 'ds-deque.sum.php', 1 => 'Ds\\Deque::sum', ), 'next' => array ( 0 => 'ds-deque.unshift.php', 1 => 'Ds\\Deque::unshift', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/ds/ds/deque/toarray.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>
У цієї функції немає параметрів.
An array containing all the values in the same order as the deque.
Приклад #1 Ds\Deque::toArray() example
<?php
$deque = new \Ds\Deque([1, 2, 3]);
var_dump($deque->toArray());
?>
Поданий вище приклад виведе щось схоже на:
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3) }