Ds\Set::last

(PECL ds >= 1.0.0)

Ds\Set::lastReturns the last value in the set

Descripción

public Ds\Set::last ( void ) : void

Returns the last value in the set.

Parámetros

Esta función no tiene parámetros.

Valores devueltos

The last value in the set.

Errores/Excepciones

UnderflowException if empty.

Ejemplos

Ejemplo #1 Ds\Set::last() example

<?php
$set 
= new \Ds\Set([123]);
var_dump($set->last());
?>

El resultado del ejemplo sería algo similar a:

int(3)