downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

SplFileObject::fflush> <SplFileObject::current
[edit] Last updated: Fri, 17 May 2013

view this page in

SplFileObject::eof

(PHP 5 >= 5.1.0)

SplFileObject::eofReached end of file

Beschreibung

public bool SplFileObject::eof ( void )

Determine whether the end of file has been reached

Parameter-Liste

Diese Funktion hat keine Parameter.

Rückgabewerte

Returns TRUE if file is at EOF, FALSE otherwise.

Beispiele

Beispiel #1 SplFileObject::eof() example

<?php
$file 
= new SplFileObject("fruits.txt");
while ( ! 
$file->eof()) {
    echo 
$file->fgets();
}
?>

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

apple
banana
cherry
date
elderberry

Siehe auch



add a note add a note User Contributed Notes SplFileObject::eof - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites