Unbuffered streaming output
Author: BilgeCreated May 20, 2024Updated May 21, 2024
Hi, I am writing directly to php://output in my action because I do not want to buffer (large) output in memory or on disk. However, Slim quietly elects not to send headers in this case, because ResponseEmitter::emit notices headers_sent now returns true. How can I still send custom headers whilst writing output directly to PHP's output stream?
Note: Symfony supports this with StreamedResponse.
Source: slimphp/Slim