Ds\Set::first

(PECL ds >= 1.0.0)

Ds\Set::firstReturns the first value in the set

Descrição

public Ds\Set::first ( ) : mixed

Returns the first value in the set.

Parâmetros

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

Valor Retornado

The first value in the set.

Erros

UnderflowException if empty.

Exemplos

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

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

O exemplo acima irá imprimir algo similar à:

int(1)
add a note add a note

User Contributed Notes

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