Ds\Pair::toArray

(PECL ds >= 1.0.0)

Ds\Pair::toArray Converts the pair to an tableau

Description

public Ds\Pair::toArray ( void ) : array

Converts the pair to an tableau.

Note:

Casting to an tableau is not supported yet.

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 pair.

Exemples

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

<?php
$pair 
= new \Ds\Pair("a"1);

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

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

array(2) {
  ["key"]=>
  string(1) "a"
  ["value"]=>
  int(1)
}