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

search for in the

SplFileObject::fflush> <SplFileObject::current
[edit] Last updated: Fri, 18 Sep 2009

view this page in

SplFileObject::eof

(PHP 5 >= 5.1.0)

SplFileObject::eofReached end of file

Описание

public boolean SplFileObject::eof ( void )

Determine whether the end of file has been reached

Параметри

Тази функция няма параметри.

Връщани стойности

Returns TRUE if file is at EOF, FALSE otherwise.

Примери

Example #1 SplFileObject::eof example

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

Примерът по-горе ще изведе нещо подобно на:

apple
banana
cherry
date
elderberry

Вж. също



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

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