CakeFest 2024: The Official CakePHP Conference

streamWrapper::stream_eof

(PHP 4 >= 4.3.2, PHP 5, PHP 7, PHP 8)

streamWrapper::stream_eofファイルポインタが終端にあるかどうかを調べる

説明

public streamWrapper::stream_eof(): bool

このメソッドは、feof() に対応してコールされます。

パラメータ

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

戻り値

読み込み/書き込み位置がストリームの末尾にあってもうそれ以上読み込むデータがない場合に true、 それ以外の場合に false を返します。

注意

警告

ファイル全体を (file_get_contents() などで) 読み込む場合、PHP はループ内で streamWrapper::stream_read() をコールしてから streamWrapper::stream_eof() をコールします。 しかし、streamWrapper::stream_read() が空でない文字列を返す限りは streamWrapper::stream_eof() の戻り値を無視します。

参考

  • feof() - ファイルポインタがファイル終端に達しているかどうか調べる

add a note

User Contributed Notes

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