PHP 8.1.28 Released!

Ds\Vector::last

(PECL ds >= 1.0.0)

Ds\Vector::lastReturns the last value

Açıklama

public Ds\Vector::last(): mixed

Returns the last value in the vector.

Bağımsız Değişkenler

Bu işlevin bağımsız değişkeni yoktur.

Dönen Değerler

The last value in the vector.

Hatalar/İstisnalar

UnderflowException if empty.

Örnekler

Örnek 1 Ds\Vector::last() example

<?php
$vector
= new \Ds\Vector([1, 2, 3]);
var_dump($vector->last());
?>

Yukarıdaki örnek şuna benzer bir çıktı üretir:

int(3)
add a note

User Contributed Notes

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