CakeFest 2024: The Official CakePHP Conference

Ds\Deque::first

(PECL ds >= 1.0.0)

Ds\Deque::firstReturns the first value in the deque

Beschreibung

public Ds\Deque::first(): mixed

Returns the first value in the deque.

Parameter-Liste

Diese Funktion besitzt keine Parameter.

Rückgabewerte

The first value in the deque.

Fehler/Exceptions

UnderflowException if empty.

Beispiele

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

<?php
$deque
= new \Ds\Deque([1, 2, 3]);
var_dump($deque->first());
?>

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

int(1)
add a note

User Contributed Notes

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