Registry / async / amphp-byte-stream

amphp-byte-stream

JSON →
library2.1.2phppackagistunverified

A stream abstraction to make working with non-blocking I/O simple in PHP.

composer require amphp/byte-stream
INSTALL
IMPORT
SIG · AMPHP-BYTE-STREAM
A
amphp-byte-stream
asyncphpv2.1.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

InputStream
use Amp\ByteStream\InputStream;

Read and write data asynchronously using streams.

use Amp\ByteStream\InputStream; use Amp\ByteStream\OutputStream; $input = new InputStream($resource); $output = new OutputStream($resource); $data = yield $input->read(); yield $output->write($data);
Debug
Known issues
gotchaRequires an event loop (e.g., amphp/amp) and PHP 7.4+.
fix
Install amphp/amp and ensure PHP 7.4 or higher.
affects: >=2.0.0
Upgrade
Version history
2.1.2latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
31 hits · last 30 days
node
28
OpenAI (training)
1
Resources
amphp-byte-stream — pip install amphp-byte-stream · libregistry