SplFileObject::next

(PHP 5 >= 5.1.0, PHP 7, PHP 8)

SplFileObject::nextRead next line

Beschreibung

publicSplFileObject::next(): void

Moves ahead to the next line in the file.

Parameter-Liste

Diese Funktion besitzt keine Parameter.

Rückgabewerte

Es wird kein Wert zurückgegeben.

Beispiele

Beispiel #1 SplFileObject::next() example

<?php
// Read through file line by line
$file = new SplFileObject("misc.txt");
while (!
$file->eof()) {
echo
$file->current();
$file->next();
}
?>

Siehe auch

To Top