Ds\Pair::toArray
PHP function
Edit on GitHub ✎
(PECL ds >= 1.0.0)
Converts the pair to an Array
Description
Ds\Pair::toArray(): array
Converts the pair to an Array.
Note
Casting to an Array is not supported yet.
Parameters Parameters
Return Values
An Array containing all the values in the same order as the pair.
Examples
Ds\Pair::toArray() example
php
<?php
$pair = new \Ds\Pair("a", 1);
var_dump($pair->toArray());
?>The above example will output something similar to:
output
array(2) {
["key"]=>
string(1) "a"
["value"]=>
int(1)
}