Skip to content

Append stream resources into a single stream to read from.

Notifications You must be signed in to change notification settings

kevengodet/append-stream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Append stream resources into a single stream to read from.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages