function PhpStreamWrapperInterface::stream_eof
Same name in other branches
- 9 core/lib/Drupal/Core/StreamWrapper/PhpStreamWrapperInterface.php \Drupal\Core\StreamWrapper\PhpStreamWrapperInterface::stream_eof()
- 8.9.x core/lib/Drupal/Core/StreamWrapper/PhpStreamWrapperInterface.php \Drupal\Core\StreamWrapper\PhpStreamWrapperInterface::stream_eof()
- 11.x core/lib/Drupal/Core/StreamWrapper/PhpStreamWrapperInterface.php \Drupal\Core\StreamWrapper\PhpStreamWrapperInterface::stream_eof()
Tests for end-of-file on a file pointer.
This method is called in response to feof().
Warning, when reading the whole file (for example, with file_get_contents()), PHP will call PhpStreamWrapperInterface::stream_read() followed by PhpStreamWrapperInterface::stream_eof() in a loop but as long as PhpStreamWrapperInterface::stream_read() returns a non-empty string, the return value of PhpStreamWrapperInterface::stream_eof() is ignored.
Return value
bool 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.
See also
feof()
http://php.net/manual/en/streamwrapper.stream-eof.php
2 methods override PhpStreamWrapperInterface::stream_eof()
- DummyExternalReadOnlyWrapper::stream_eof in core/
modules/ file/ tests/ file_test/ src/ StreamWrapper/ DummyExternalReadOnlyWrapper.php - Tests for end-of-file on a file pointer.
- LocalStream::stream_eof in core/
lib/ Drupal/ Core/ StreamWrapper/ LocalStream.php - Tests for end-of-file on a file pointer.
File
-
core/
lib/ Drupal/ Core/ StreamWrapper/ PhpStreamWrapperInterface.php, line 204
Class
- PhpStreamWrapperInterface
- Defines a generic PHP stream wrapper interface.
Namespace
Drupal\Core\StreamWrapperCode
public function stream_eof();
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.