Set
PHP Manual

Ds\Set::first

(PECL ds >= 1.0.0)

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

Beschreibung

public void Ds\Set::first ( void )

Returns the first value in the set.

Parameter-Liste

Diese Funktion hat keine Parameter.

Rückgabewerte

The first value in the set.

Fehler/Exceptions

UnderflowException if empty.

Beispiele

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

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

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

int(1)

Set
PHP Manual