Returns the remaining contents of the stream as a string.
public getContents ( ) : string | ||
return | string |
public function testGetsContents() { $handle = fopen('php://temp', 'w+'); $stream = new Stream($handle); fwrite($handle, 'data'); $this->assertEquals('data', $stream->getContents()); }