CakeFest 2024: The Official CakePHP Conference

Ds\Pair::toArray

(PECL ds >= 1.0.0)

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

Beschreibung

public Ds\Pair::toArray(): array

Converts the pair to an Array.

Hinweis:

Casting to an Array is not supported yet.

Parameter-Liste

Diese Funktion besitzt 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)
}
add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top