Ds\Sequence::last

Returns the last value

説明

abstract public mixed Ds\Sequence::last()

Returns the last value in the sequence.

パラメータ

この関数にはパラメータはありません。

戻り値

The last value in the sequence.

エラー / 例外

UnderflowException if empty.

例1 Ds\Sequence::last example

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

上の例の出力は、 たとえば以下のようになります。

int(3)