Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78488 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13129 invoked from network); 30 Oct 2014 20:33:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Oct 2014 20:33:13 -0000 Authentication-Results: pb1.pair.com header.from=theanomaly.is@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=theanomaly.is@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.181 as permitted sender) X-PHP-List-Original-Sender: theanomaly.is@gmail.com X-Host-Fingerprint: 209.85.212.181 mail-wi0-f181.google.com Received: from [209.85.212.181] ([209.85.212.181:64767] helo=mail-wi0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3F/D1-04091-880A2545 for ; Thu, 30 Oct 2014 15:33:12 -0500 Received: by mail-wi0-f181.google.com with SMTP id n3so8505297wiv.2 for ; Thu, 30 Oct 2014 13:33:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=vr20GUt9in2q/s9LtdE4TtjTugLe1YSAiMo2CDTTND4=; b=Njw/WF8X2TwhBmCYoo6xkFmHRF3wBQ16Jmk5uHFM3Tjt179yLq51JSz965hFIXY0m8 pWJqIhAkhTznhZGLue4yH1McSEw4f/rZCyN23T98sFWK7bCq5tiW1uaZl7jNmq924aMQ Bn8TR7UzeJBHcK2Iwt6n1o1LCgE5wvlSc4Fydbt/TFctE7f4h4F6cCVhv4ao6AZzBB5H k2NPlW3NJwi0Rpc+Mhmu8sT1g08PNRB0txfSvpksq32aC2/gVo9JGTcJH9txbuLjESHx tMRhH0Q1JEb+Z+xtS8M8MHUlNps0yiRbuvjKNiwe/py871Uw4RluA9xNk4GDsvuHFZiY uupg== MIME-Version: 1.0 X-Received: by 10.180.11.227 with SMTP id t3mr22820611wib.45.1414701188995; Thu, 30 Oct 2014 13:33:08 -0700 (PDT) Received: by 10.216.123.4 with HTTP; Thu, 30 Oct 2014 13:33:08 -0700 (PDT) In-Reply-To: <36B5E957-01C0-40F2-B4CE-5B02D11ACA14@ajf.me> References: <36B5E957-01C0-40F2-B4CE-5B02D11ACA14@ajf.me> Date: Thu, 30 Oct 2014 16:33:08 -0400 Message-ID: To: Andrea Faulds Cc: Florian Margaine , PHP Internals Content-Type: multipart/alternative; boundary=001a11c2400cd5624f0506a9c964 Subject: Re: [PHP-DEV] New Standardized HTTP Interface From: theanomaly.is@gmail.com (Sherif Ramadan) --001a11c2400cd5624f0506a9c964 Content-Type: text/plain; charset=UTF-8 On Thu, Oct 30, 2014 at 4:24 PM, Andrea Faulds wrote: > > > On 30 Oct 2014, at 19:49, Sherif Ramadan > wrote: > > > > Well, let's look at how well providing implementation has worked out for > > PHP so far. > > > > GPC variables are implementation. They pose rigidity to userland code > for a > > number of reasons. For example, if you do send a PUT request to PHP, PHP > > will not bother populating GPC at all. Instead it leaves the user to > define > > their own handling from the input stream directly. If you do send > GET/POST > > requests to PHP, the variable names can be mangled and $_GET/$_POST are > > treated differently for encoding as one is run through url_decode and the > > other is not. > > We could just fix these problems rather than adding an entirely new > implementation. > Yes, this proposal is intended to do two things. 1) Fix the aforementioned problems. 2) Improve upon the capabilities of PHP's request handling for future use cases through a unified interface. To say that this proposal and fixing the aforementioned problems are two distinct options (as in we can either fix these problems or go with this proposal) is a very reductive form of thinking in which the only outcome favors one party or the other. My proposal is intended to result in a win-win situation where everyone involved can be satisfied, not an ultimatum. If you consider all of the major existing PHP frameworks today there is always some form of HttpRequest class handling these things and almost all of them do it slightly differently. What's worse, is they are all very inefficient implementations that I believe can be done far more efficiently in php-src. A lost of them are also unnecessarily complex. I think all of this can be simplified if the interface is just laid out in a straight-forward manner and then userland implementations will find less and less reason to over-engineer the implementation. > -- > Andrea Faulds > http://ajf.me/ > > > > > --001a11c2400cd5624f0506a9c964--