When we set the outputstream option, the output file gets opened twice: here and here.
The second handle can be managed (eg closed) by accessing the Zend\Http\Response\Stream\getStream() method, but the first handle is simply lost: the file remains open (ie locked) until the end of the execution of the PHP script.
When we set the
outputstream
option, the output file gets opened twice: here and here.The second handle can be managed (eg closed) by accessing the
Zend\Http\Response\Stream\getStream()
method, but the first handle is simply lost: the file remains open (ie locked) until the end of the execution of the PHP script.Let's reuse the first file handle.