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

search for in the

SplTempFileObject> <SplFileObject::__toString
[edit] Last updated: Fri, 25 May 2012

view this page in

SplFileObject::valid

(PHP 5 >= 5.1.0)

SplFileObject::validファイル終端でないかチェックする

説明

public bool SplFileObject::valid ( void )

ファイル終端に到達したかチェックします。

パラメータ

この関数にはパラメータはありません。

返り値

ファイル終端に到達していなければ TRUE、そうでなければ FALSE を返します。

例1 SplFileObject::valid() の例

<?php
// Loop over a file, line by line
$file = new SplFileObject("file.txt");
while (
$file->valid()) {
    echo 
$file->fgets();
}
?>

参考



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

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