array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'en', ), 'this' => array ( 0 => 'ds-pair.toarray.php', 1 => 'Ds\\Pair::toArray', ), 'up' => array ( 0 => 'class.ds-pair.php', 1 => 'Ds\\Pair', ), 'prev' => array ( 0 => 'ds-pair.jsonserialize.php', 1 => 'Ds\\Pair::jsonSerialize', ), 'next' => array ( 0 => 'class.ds-set.php', 1 => 'Ds\\Set', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/ds/ds/pair/toarray.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
This function has no parameters.
An array containing all the values in the same order as the pair.
Example #1 Ds\Pair::toArray() example
<?php
$pair = new \Ds\Pair("a", 1);
var_dump($pair->toArray());
?>
The above example will output something similar to:
array(2) { ["key"]=> string(1) "a" ["value"]=> int(1) }