Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108541 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 51666 invoked from network); 13 Feb 2020 17:53:45 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 13 Feb 2020 17:53:45 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8700C1804DA for ; Thu, 13 Feb 2020 08:08:12 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS29169 217.70.176.0/20 X-Spam-Virus: No X-Envelope-From: Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 13 Feb 2020 08:08:11 -0800 (PST) X-Originating-IP: 107.223.28.39 Received: from samurai.attlocal.net (107-223-28-39.lightspeed.nsvltn.sbcglobal.net [107.223.28.39]) (Authenticated sender: pmjones@pmjones.io) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id B55E01BF21E; Thu, 13 Feb 2020 16:08:09 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) In-Reply-To: <4E050173-8FCC-4770-BCD2-22DB22E24EFC@php.net> Date: Thu, 13 Feb 2020 10:08:07 -0600 Cc: PHP Internals List Content-Transfer-Encoding: quoted-printable Message-ID: <7D960D1A-B348-4D96-A81F-CB79F31862D2@pmjones.io> References: <50BD013E-CF72-414C-BBC0-A7A2E45CBDDB@pmjones.io> <3efc8ed3-61a8-dad8-dd1f-207217589eba@allenjb.me.uk> <4E050173-8FCC-4770-BCD2-22DB22E24EFC@php.net> To: Ruud Boon X-Mailer: Apple Mail (2.3608.60.0.2.5) Subject: Re: [PHP-DEV] RFC: Server-Side Request and Response Objects (v2) From: pmjones@pmjones.io ("Paul M. Jones") Hi Ruud, > On Feb 13, 2020, at 00:45, Ruud Boon wrote: >=20 > Hi! >=20 > I really like this RFC.=20 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. --=20 Paul M. Jones pmjones@pmjones.io http://paul-m-jones.com Modernizing Legacy Applications in PHP https://leanpub.com/mlaphp Solving the N+1 Problem in PHP https://leanpub.com/sn1php