keven/

append-stream

将流资源追加到一个单一的流中以便读取。

1.0.5 2018-04-13 08:59 UTC

This package is auto-updated.

Last update: 2024-09-23 08:27:33 UTC


README

在不占用过多内存的情况下合并流。

安装

$ composer install keven/append-stream

使用

<?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