Ds\Set::last

(PECL ds >= 1.0.0)

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

Descrição

public Ds\Set::last ( ) : mixed

Returns the last value in the set.

Parâmetros

Esta função não possui parâmetros.

Valor Retornado

The last value in the set.

Erros

UnderflowException if empty.

Exemplos

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

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

O exemplo acima irá imprimir algo similar à:

int(3)
add a note add a note

User Contributed Notes

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