eof() public method

Returns true if the stream is at the end of the stream.
public eof ( ) : boolean
return boolean
Ejemplo n.º 1
0
 public function testChecksEof()
 {
     $handle = fopen('php://temp', 'w+');
     $stream = new Stream($handle);
     fwrite($handle, 'data');
     $this->assertFalse($stream->eof());
     $stream->read(4);
     $this->assertTrue($stream->eof());
 }