Ds\Pair::toArray

(PECL ds >= 1.0.0)

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

Descrizione

public Ds\Pair::toArray(): array

Converts the pair to an array.

Nota:

Casting to an array is not supported yet.

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

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

Esempi

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

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

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

Il precedente esempio visualizzerà qualcosa simile a:

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