dvdoug/stringstream

Stream wrapper for strings. Basically, like php://temp except that you can have multiple streams

v1.1.3 2019-11-28 20:49 UTC

This package is auto-updated.

Last update: 2020-03-14 19:27:09 UTC


README

Stream wrapper for strings. Basically, like php://temp except that you can have multiple streams at once, and can pre-initialise the contents.

Build Status Scrutinizer Code Quality Download count Download count

Usage

stream_wrapper_register('string', '\DVDoug\StringStream\StringStream');

$handle = fopen('string://foobar', 'r+');
$contents = '';
while (!feof($handle)) {
  $contents .= fread($handle, 8192);
}
fclose($handle);

Requirements

  • PHP 7.1 or higher

License

StringStream is MIT-licensed.