Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<streamWrapper::stream_closestreamWrapper::stream_flush>
^streamWrapperLast updated: Mon, 26 Oct 2026

streamWrapper::stream_eof

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

streamWrapper::stream_eof — Tests for end-of-file on a file pointer

Description

public function streamWrapper::stream_eof(): bool

This method is called in response to feof().

Parameters

This function has no parameters.

Return Values

Should return true if the read/write position is at the end of the stream and if no more data is available to be read, or false otherwise.

Notes

Warning

When reading the whole file (for example, with file_get_contents()), PHP will call streamWrapper::stream_read() followed by streamWrapper::stream_eof() in a loop but as long as streamWrapper::stream_read() returns a non-empty string, the return value of streamWrapper::stream_eof() is ignored.

See Also

  • feof() - Tests for end-of-file on a file pointer


<streamWrapper::stream_closestreamWrapper::stream_flush>
^streamWrapperLast updated: Mon, 26 Oct 2026