PHP 8.6.0 Beta 3 is available for testing

Yaf_Session::next

(Yaf >=1.0.0)

Yaf_Session::nextAdvance to next session entry

Beschreibung

public function Yaf_Session::next(): void

Moves the internal iterator to the next session entry.

Parameter-Liste

Diese Funktion besitzt keine Parameter.

Rückgabewerte

No value is returned.

Beispiele

Beispiel #1 Yaf_Session::next() example

<?php
$session = Yaf_Session::getInstance();
$session->start();

$session->set("user_id", 42);
$session->set("lang", "en");

$session->rewind();
echo $session->key(), PHP_EOL;

$session->next();
echo $session->key(), PHP_EOL;
?>

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

user_id
lang

Siehe auch

add a note

User Contributed Notes

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