Ds\Map::last
Returns the last pair of the map.
Beschreibung
public Ds\Pair Ds\Map::last
( void
)
Parameter-Liste
Diese Funktion hat keine Parameter.
Rückgabewerte
The last pair of the map.
Fehler/Exceptions
UnderflowException if empty.
Beispiele
Beispiel #1 Ds\Map::last example
<?php
$map = new \Ds\Map(["a" => 1, "b" => 2, "c" => 3]);
var_dump($map->last());
?>
Das oben gezeigte Beispiel erzeugt
eine ähnliche Ausgabe wie:
object(Ds\Pair)#2 (2) {
["key"]=>
string(1) "c"
["value"]=>
int(3)
}