1. Go to this page and download the library: Download zenstruck/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/ */
/** @var \Zenstruck\Stream $stream */
// metadata
$stream->id(); // int - the resource id
$stream->type(); // string - the resource type
$stream->metadata(); // array - the resources metadata
$stream->metadata('wrapper_type'); // mixed - specific resource metadata key
$stream->uri(); // string - shortcut for `$stream->metadata('uri')`
// read
$stream->get(); // resource - the raw, wrapped resource
$stream->contents(); // string - the contents of the resource (auto-rewound)
// write
$stream->write($resource); // self - write another resource to the stream
$stream->write('string'); // self - write a string to the stream
$stream->write($anotherStream); // self - write another \Zenstruck\Stream instance to the stream
// manipulate
$stream->close(); // no-return - close the resource (if open)
$stream->rewind(); // self - rewind the stream
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.