Ds\Sequence::first

Returns the first value in the sequence.

Beschreibung

abstract public mixed Ds\Sequence::first ( void )

Returns the first value in the sequence.

Parameter-Liste

Diese Funktion hat keine Parameter.

Rückgabewerte

The first value in the sequence.

Fehler/Exceptions

UnderflowException if empty.

Beispiele

Beispiel #1 Ds\Sequence::first example

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

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

int(1)