Ds\Pair::toArray

Converts the pair to an array.

Beschreibung

public array Ds\Pair::toArray ( void )

Converts the pair to an array.

Hinweis:

Casting to an array is not supported yet.

Parameter-Liste

Diese Funktion hat keine Parameter.

Rückgabewerte

An array containing all the values in the same order as the pair.

Beispiele

Beispiel #1 Ds\Pair::toArray example

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

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

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

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