Iztok

Results 3 comments of Iztok

+1 Looking to iterate through each stream chunk but stream methods return StreamInterface that doesn't allow this (https://github.com/theodo-group/LLPhant/issues/78#issuecomment-1939347314)

If anyone finds this helpful: ``` $streamToIterator = function (StreamInterface $stream): Generator { while (!$stream->eof()) { yield $stream->read(32); // Adjust the chunk size as needed } }; $iteratorStream = $streamToIterator($stream);...

> @iztok the code your provided is working for you to get a stream? Yes, this returns an iterateable stream I can use the same as I used the stream...