Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100119 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2350 invoked from network); 30 Jul 2017 04:53:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Jul 2017 04:53:43 -0000 Authentication-Results: pb1.pair.com smtp.mail=lists@rhsoft.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=lists@rhsoft.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain rhsoft.net designates 91.118.73.15 as permitted sender) X-PHP-List-Original-Sender: lists@rhsoft.net X-Host-Fingerprint: 91.118.73.15 mail.thelounge.net Received: from [91.118.73.15] ([91.118.73.15:29435] helo=mail.thelounge.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 47/13-07025-5566D795 for ; Sun, 30 Jul 2017 00:53:42 -0400 Received: from srv-rhsoft.rhsoft.net (Authenticated sender: h.reindl@thelounge.net) by mail.thelounge.net (THELOUNGE MTA) with ESMTPSA id 3xKqwd5HjBzXMT for ; Sun, 30 Jul 2017 06:53:37 +0200 (CEST) To: internals@lists.php.net References: <12777d61-3277-413b-c60b-12c8c75bd76f@gmail.com> Message-ID: Date: Sun, 30 Jul 2017 06:53:37 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-CH Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Changes to SuperGlobals for PHP 8 From: lists@rhsoft.net ("lists@rhsoft.net") Am 30.07.2017 um 01:35 schrieb Kalle Sommer Nielsen: > 2017-07-29 22:17 GMT+02:00 Stanislav Malyshev : >> I've seen scenarios where it is very useful. Sure, you can always build >> another layer of indirection and solve it this way, but it's just making >> people do more work for no reason. I don't see any problem that would solve. > > Sure it seems useful, but I see it more as a hack if you are just > writing to superglobals anyway, if you need to change something you > should do that with your own logic instead. well, you can do that in your code as you like > If its something simple such as your code assumes $_GET['id'] always > is available, then either write it to a temp variable. or just leave that decision to the developer > I know many applications nowadays are not written with an excess > amount of globals everywhere, but writing to a global without > explicitly declaring you want to, can cause some hard to debug cases > if one function modifies a global and another assumes an unmodified > value. I'd like to see that gone frankly are you forced to use it? PHP has really more important possible improvements than breaking others code just because you like to see something gone - in my code i write to $_SERVER in a central point to fix the issue that you developers missed to standardize what is available there 15 years ago on differnet operating systems/SAPI's hence my code runs since 15 years ago without spit checks around all over the codebase and now you "like to see that gone"? frankly i like the "what can i do to break others code" attitude of some people go and if you like to break something for a good reason fix inconsistences in the param oders of some database unctions - but better don't because i fear your proposed solution would be "why not remove anything except PDO"