PHPWales 2020 - June 3rd to June 4th

Ds\Deque::last

(PECL ds >= 1.0.0)

Ds\Deque::lastReturns the last value

Descrição

public Ds\Deque::last ( void ) : mixed

Returns the last value in the deque.

Parâmetros

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

Valor Retornado

The last value in the deque.

Erros

UnderflowException if empty.

Exemplos

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

<?php
$deque 
= new \Ds\Deque([123]);
var_dump($deque->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