PHP code example of keven / append-stream
1. Go to this page and download the library: Download keven/append-stream library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
keven / append-stream example snippets
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