keven / append-stream
Append stream resources into a single stream to read from.
Installs: 15 501
Dependents: 2
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 0
Open Issues: 0
Requires (Dev)
- phpunit/phpunit: ^7.0
README
Concatenate streams without bloating the memory.
Install
$ composer install keven/append-stream
Usage
<?php use Keven\AppendStream\AppendStream; // Concatenate 3 streams $handle = (new AppendStream([ fopen('data://text/plain,stream1','r'), fopen('data://text/plain,stream2','r'), fopen('data://text/plain,stream3','r'), ]))->getResource(); echo stream_get_contents($handle); // stream1stream2stream3