Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100095 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24071 invoked from network); 29 Jul 2017 06:47:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jul 2017 06:47:56 -0000 Authentication-Results: pb1.pair.com smtp.mail=thruska@cubiclesoft.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=thruska@cubiclesoft.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain cubiclesoft.com designates 149.56.142.28 as permitted sender) X-PHP-List-Original-Sender: thruska@cubiclesoft.com X-Host-Fingerprint: 149.56.142.28 28.ip-149-56-142.net Received: from [149.56.142.28] ([149.56.142.28:47648] helo=28.ip-149-56-142.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8E/FA-40376-79F2C795 for ; Sat, 29 Jul 2017 02:47:51 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: thruska@cubiclesoft.com) with ESMTPSA id 410263E84E To: Sara Golemon , PHP internals References: Message-ID: Date: Fri, 28 Jul 2017 23:47:46 -0700 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Changes to SuperGlobals for PHP 8 (was: something about session_start...) From: thruska@cubiclesoft.com (Thomas Hruska) On Fri, Jul 28, 2017 at 11:03 AM, lists@rhsoft.net wrote: > make POST/GET/SERVER readonly - only when you refactor a 250000 line code > base as well as deplyed code which relies on the framework did the right > thing with them previously :-) Are you advocating for read-only or leaving them read-write? I can't tell. Every language feature in every language can be abused. Having sufficient documentation helps avoid unwanted abuse. As a brief demonstration of how that plays out, a quick search on the website turned up: http://us3.php.net/manual/en/reserved.variables.request.php There isn't an example usage pattern there nor any restrictions/recommendations on use and the top comment has 97 upvotes. The first thing that person's code does is freely set new values in multiple superglobals without sufficient explanation that doing so is a bad idea. Therefore, drive-by PHP users can derive that it must be okay to store general-purpose information into a superglobal. "This must be the right way to do things since it has over 10 times as many upvotes as the next comment on the page." While I'm for read-write superglobals, I will, of course, live with whatever is decided upon and adapt accordingly. Making some documentation adjustments seems like a simpler thing to do than a BC break. -- Thomas Hruska CubicleSoft President I've got great, time saving software that you will find useful. http://cubiclesoft.com/ And once you find my software useful: http://cubiclesoft.com/donate/