Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 472 Bytes

README.md

File metadata and controls

27 lines (19 loc) · 472 Bytes

keven/append-stream

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