Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96159 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91462 invoked from network); 26 Sep 2016 21:32:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Sep 2016 21:32:10 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.180 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.220.180 mail-qk0-f180.google.com Received: from [209.85.220.180] ([209.85.220.180:35137] helo=mail-qk0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C2/23-04248-8D399E75 for ; Mon, 26 Sep 2016 17:32:09 -0400 Received: by mail-qk0-f180.google.com with SMTP id t7so183767738qkh.2 for ; Mon, 26 Sep 2016 14:32:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=rpPPR/BA2Qn8KfBory6PVmXwi3r5Xpc673dKSUwp7UE=; b=mg++A09l34Xc4p/VwTAomqNOBl6tHj0uMPvMOhV8Kb3OtzbpjXQL5eLNr0AC+pUYr3 Ju4xneJYs9Bu7Dir/3/dMco91Ix7H4f8x++jm6z6LnXH+UlbaL2ZCa/brUbyLSvC2PkG xF1FHgIEY9jb22ysMPs8bTmU8uEsWlIXqzYtnNXnTWJOgU40HOiStP05WErA3E0RVaiM 7Lx4QLnUoxcpjWoPdXFjmLgEIH9hsUB1pV8ov1msQHOvjaHg0oveCZFOh1SjqEmX69/P KhwNqBop0YUxRK2wRbfoSvVC2J2z1h1EaSEiKPxjwwQt2ZlDUTN4dxtIawQUYkFKiQAv Vn2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=rpPPR/BA2Qn8KfBory6PVmXwi3r5Xpc673dKSUwp7UE=; b=kmQaYANcLzXZINRRufDEp9vjsStKfKNt5h0isB1ciAAE8gEKkVI32Dc/iOQIsylhFY 1OE0c3za4hsGt/YXsU0JD5cy6KmOye3eq8K2MPr6H0HTu9CUBdDpmyHhUdPrzFdD+rIz aWjzc1V2GbzstcVEgorx7xE4yRvpvcFkew1EwiXpZPmSkt+lr0En1o+wVW3OplNUPxb5 LOS9TdzqFMZgRXLIy1tHzBVftek87Oq5mCqDBH2Qq4JB6d+sJOa6dwHrAvlBkwGoJlCT naOi4VA8zM7DcCjzKXxfTEUnK8BRg8GHuCo+Q+og7D06xxv0x0ek+dCiYKZ8BV6kFQDP WQaw== X-Gm-Message-State: AA6/9RnaUrvImmaNMo1f40kNRoGiho68+esNu6f8EN1HgCL2zW8MWnupTIoN2gVWCv8Uug== X-Received: by 10.194.85.225 with SMTP id k1mr9956291wjz.136.1474925525198; Mon, 26 Sep 2016 14:32:05 -0700 (PDT) Received: from [192.168.1.5] ([95.148.161.240]) by smtp.googlemail.com with ESMTPSA id u64sm13164591wmd.20.2016.09.26.14.32.04 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Sep 2016 14:32:04 -0700 (PDT) To: internals@lists.php.net References: Message-ID: <1e5a2abd-0044-5d57-d4b2-ddbbd3577639@gmail.com> Date: Mon, 26 Sep 2016 22:32:03 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Server-Side Request/Response Objects From: rowan.collins@gmail.com (Rowan Collins) On 26/09/2016 20:37, Paul Jones wrote: > tl;dr: Gauging interest in an extension for server-side PHP request and response objects (*not* HTTP messages per se; see below) prior to writing an RFC for them on the wiki. This sounds like an interesting project, but I have a few questions. First, the obvious one: why does this need to be an extension and/or built into core? Are there reasons such as performance for implementing this in C rather than PHP? Does it provide functionality that is hard to implement in a userland library? You mention that it is not just an HTTP wrapper, but although you mention researching other frameworks, I can't see any reference to PSR-7 [http://www.php-fig.org/psr/psr-7/]. What do you see as the relationship between your proposal and that standardisation effort? Regarding the design of the objects themselves, why is stdRequest property-only, but stdResponse method-only? The asymmetry feels awkward to me. I think the most interesting parts are those that attempt to rationalise $_SERVER, and I think a library (or built-in functionality) devoted to those could be very useful. Some of that overlaps with PSR-7, but that standard doesn't go into depth on things like Accept headers, Authentication, etc. Like I say, it's an interesting idea, but I'm not sure how it fits in with the wider ecosystem. Regards, -- Rowan Collins [IMSoP]