amphp/byte-stream
Event-driven byte stream abstractions for PHP 8.1+ in the AMPHP ecosystem. Provides ReadableStream/WritableStream interfaces plus implementations like Payload, buffers, resource/iterable streams, stream chaining, base64 encode/decode, and decompression for fiber-friendly I/O.
Adopt when your application uses or plans to adopt the Amp event loop, requires efficient non-blocking I/O for concurrent connections, or needs standardized stream composition with built-in backpressure. Avoid if your project relies on synchronous PHP patterns (e.g., traditional Laravel without async extensions), has trivial I/O needs, or uses competing async frameworks like ReactPHP/Swoole where ecosystem compatibility is critical. Also skip if your team lacks experience with event-loop architectures, as debugging async flows introduces complexity.
Executives: "This package lets us handle 10x more concurrent users with the same infrastructure by eliminating blocking I/O bottlenecks. It’s a proven, MIT-licensed solution that reduces server costs while enabling real-time features like live analytics and chat—directly improving customer retention and revenue potential."
Engineering: "It provides standardized, backpressure-aware stream interfaces that work seamlessly across sockets, files, and network sources. By integrating with Amp’s event loop, it removes manual buffering logic and ensures safe throughput—cutting development time for streaming features by 40%+ while reducing bugs in high-load scenarios."
How can I help you explore Laravel packages today?