Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100093 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4194 invoked from network); 28 Jul 2017 21:12:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Jul 2017 21:12:19 -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.128.174 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.128.174 mail-wr0-f174.google.com Received: from [209.85.128.174] ([209.85.128.174:35884] helo=mail-wr0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 64/B9-40376-2B8AB795 for ; Fri, 28 Jul 2017 17:12:19 -0400 Received: by mail-wr0-f174.google.com with SMTP id y43so159197511wrd.3 for ; Fri, 28 Jul 2017 14:12:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:user-agent:in-reply-to:references:mime-version :content-transfer-encoding:subject:to:from:message-id; bh=xbZ/XaqgTMnGGyS5xVTwANJKI8Uf1sXqUb0/JOIyxK0=; b=Og8dD1qeOfsWXMgl+vS96sVHumVydNjeCTJjk3oN7m3MOMJYSI3AJ/FX5GGzRuYl+8 ZYi5xqFR9HOK3dgcE1cwSWTNtu3fZcykeF0Kfkbuz/rgBIDqJ2IltqQDjRuiYg4JYbRw f1bX+/bLgHav4rzujtAFST3L72rPzMsKLQKv5JtkEIytdR8woHZ/0qIkvSS64Tj1LS4k 9BkR7c/rP5HXy1u9NZfXELMnJGoX91gSB9OhswUFb1GMX8w10R6AwptOos39jZ809kyh JOhZF+OWOMTI/USv4fXETAb5vPB5LTCtuaP+olHdeVynOkRSSNaAHKcaHNUz8Wg1z7VX FuAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:user-agent:in-reply-to:references :mime-version:content-transfer-encoding:subject:to:from:message-id; bh=xbZ/XaqgTMnGGyS5xVTwANJKI8Uf1sXqUb0/JOIyxK0=; b=eLf05jyeezIzxo9B3J7fv/YlQVD9DlcofIMtO6A5I6+RI8H0mv7hD6J41qFn5lK+zx v5b1r8TLBZaB/IwCJfKAYMzWgOQGjZ1rbdtwOD9pVnv3OmQ49fhVd81GWMx5M5w46Lwh K+HZ82hX59oGXvioLVciP6ge3josIdylh1cwW5dhXyCnwJTAci/Sz0/IJ9IwrGfzmluk MGSYyYmV9JBpaS1HdwxTqJecwhWAQqz9DwKfKy3qZtLoCqMBQAG3/xEaWJfhBY7MTni0 cgxxCsyjRdUMDfOfptXusVLDfToWg5wZyDyPFxIxRp2HWLozKNFu2O/pX4SsMr/0syFH HNRQ== X-Gm-Message-State: AIVw111HWFJVOatLrn/1hDZ9SBB0Y/i1SG3kI0/AM8qNkJhdGp/6lHi4 Aum9MdKyF5nHxes5SDM= X-Received: by 10.223.169.100 with SMTP id u91mr6495986wrc.290.1501276335302; Fri, 28 Jul 2017 14:12:15 -0700 (PDT) Received: from [10.93.7.203] (94.197.121.155.threembb.co.uk. [94.197.121.155]) by smtp.gmail.com with ESMTPSA id s4sm4818142wmb.27.2017.07.28.14.12.14 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Jul 2017 14:12:14 -0700 (PDT) Date: Fri, 28 Jul 2017 22:12:10 +0100 User-Agent: K-9 Mail for Android In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable To: PHP internals Message-ID: <72B777E0-9E71-4D63-A9D0-20FD62F1A187@gmail.com> Subject: Re: [PHP-DEV] Changes to SuperGlobals for PHP 8 (was: something about session_start...) From: rowan.collins@gmail.com (Rowan Collins) Hi Sara, >>> On Fri, Jul 28, 2017 at 5:45 PM, Sara Golemon >wrote: >>>> ftr; I'd vote in favor of several BC breaking things to do with >>>> autoglobals, among them: >>>> >>>> * Make them objects (though ArrayAccess based for less hostile BC >>>> breakage) >>>> * Make most of them read-only (offsetGet(), but no offsetSet) >>>> * Make $_SESSION[=2E=2E=2E] access produce an error or auto-start the >session Yep, this is pretty much what I had in mind when I made that passing remar= k, but didn't want to derail the thread=2E Now it has its own thread, howev= er, I'm going to argue against myself and say why I think this is the wrong= direction=2E ;) The obvious downside of changing request vars to read only is the huge bod= y of code that writes to them=2E This isn't all bad code: as rhsoft points = out, testing any code that *reads* those vars necessarily requires the harn= ess to write to them; and a common way to *prevent* reading them is to over= write them with empty values=2E More importantly, though, it's papering over the problem, which is that re= quest information shouldn't be global=2E There are other barriers to a thre= aded, event-based SAPI becoming core and default, but a scoped request repr= esentation would be high up the todo list=2E There was mention a while ago of discussion in the Python community of rep= lacing WSGI with an even more flexible interface for the HTTP2 era, support= ing worker and server push models as well as request-response=2E The sugges= tion was that PHP could learn from or even collaborate on that model=2E Doe= s anyone know its status? Obviously, that's a much more ambitious project, but if we're talking 10 y= ears to phase in a breaking change, it would be good to at least attempt so= me future-proofing, rather than just adding a few restrictions which were m= issed 10 years ago, and implicitly extending the lifetime of the concept of= global request data=2E On a slight tangent, I consider $_SERVER to be a broken pile of "we'll jus= t shove this in here and hope for the best", and I will oppose any attempt = to convert it into an object which doesn't reorganize its keys to be sane, = documented, and as cross-platform as the SAPI layer can make it=2E :P Regards, --=20 Rowan Collins [IMSoP]