- •
php_stream_read() or fread() requests n bytes to be placed
into a buffer.
- •
The topmost filter on the read stack returns the data from its own buffered brigade,
if any, splitting buckets if required.
- •
If it doesn't have enough data, it asks the next filter in the stack
for some more data.
- •
This process repeats until the actual underlying stream is hit.
- •
The stream reads a chunk of data and returns it to the filter.
- •
The data moves along the brigades, perhaps being transformed
along the way.
- •
Topmost filter gets the data and stores it in the buffer.
- •
Process repeats until the buffer is filled or there is
no more data available from the stream.