Re: [PHP-DEV] RFC: Server-Side Request and Response Objects (v2)

This is only part of a thread. view whole thread
February 13, 2020 16:08 ("Paul M. Jones")
Hi Ruud,

> On Feb 13, 2020, at 00:45, Ruud Boon <> wrote: > > Hi! > > I really like this RFC.
Glad to hear it!
> In the the RFC I see that $content will return php://input using file_get_contents on the fly. Can we add the possibility to get a reference to the stream as well?
By "get a reference" I presume you mean "an open file handle" (a la `return fopen('php://input', 'rb')`). In which case: maybe? I can see where that would be useful for extremely large request bodies in a memory-constrained environment. But the question becomes: is that needed frequently-enough across a wide-enough range of PHP developers to warrant inclusion in this RFC? I don't recall seeing any userland implementation from my research provide such a thing. That makes me think it's a comparatively infrequent need. If many others disagree with that assessment, I'm happy to entertain the possibility of adding something like it to ServerRequest. -- Paul M. Jones Modernizing Legacy Applications in PHP Solving the N+1 Problem in PHP