PHP code example of rkr / streams-common
1. Go to this page and download the library: Download rkr/streams-common 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/ */
rkr / streams-common example snippets
use Kir\Streams\InputStream;
use Kir\Streams\Common\PhpStream;
function test(InputStream $stream) {
echo $stream->read();
}
$stream = new PhpStream('php://memory', 'r+', true);
$stream->write('This is a test')->rewind();
test($stream);