(PECL ds >= 1.0.0)
Ds\Map::last — Returns the last pair of the map
У цієї функції немає параметрів.
The last pair of the map.
UnderflowException if empty.
Приклад #1 Ds\Map::last() example
<?php
$map = new \Ds\Map(["a" => 1, "b" => 2, "c" => 3]);
var_dump($map->last());
?>Поданий вище приклад виведе щось схоже на:
object(Ds\Pair)#2 (2) {
["key"]=>
string(1) "c"
["value"]=>
int(3)
}