首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

streamWrapper::stream_eof

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

streamWrapper::stream_eof - 测试文件结尾的文件指针

描述

代码语言:javascript
复制
public bool streamWrapper::stream_eof ( void )

这个方法在响应feof()时被调用。

参数

该函数没有参数。

返回值

如果TRUE读/写位置在数据流的末尾,并且没有更多数据可用于读取,则返回FALSE

注意

警告

当读取整个文件时(例如,使用file_get_contents()),PHP将在循环中调用streamWrapper::stream_read(),然后调用streamWrapper::stream_eof(),但只要streamWrapper::stream_read()返回一个非空字符串,streamWrapper::stream_eof()的返回值被忽略。

另请参阅

  • feof() - 测试文件结尾的文件指针

← streamWrapper::stream_close

streamWrapper::stream_flush →

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com