Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100099 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 41944 invoked from network); 29 Jul 2017 13:04:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jul 2017 13:04:24 -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:51517] helo=mail.thelounge.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9D/8C-40376-6D78C795 for ; Sat, 29 Jul 2017 09:04:22 -0400 Received: from srv-rhsoft.rhsoft.net (Authenticated sender: h.reindl@thelounge.net) by mail.thelounge.net (THELOUNGE MTA) with ESMTPSA id 3xKQsG2PvPzXMb for ; Sat, 29 Jul 2017 15:04:18 +0200 (CEST) To: internals@lists.php.net References: Message-ID: <52c3f484-5b20-c0ef-e797-1a199931ddbb@rhsoft.net> Date: Sat, 29 Jul 2017 15:04:18 +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 29.07.2017 um 08:47 schrieb 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 how comes? -------- Weitergeleitete Nachricht -------- Betreff: Re: [PHP-DEV] Changes to SuperGlobals for PHP 8 Datum: Fri, 28 Jul 2017 18:42:16 +0200 Von: lists@rhsoft.net An: internals@lists.php.net Am 28.07.2017 um 18:21 schrieb Kalle Sommer Nielsen: > I for one thing it makes a lot of sense to make superglobals > read-only, writing to them seems more like a hack anyway and should be > avoided wrong question! the right questions are * are you fored to do so * are you harmed by the possibility and only if you can answer both with "yes" it's worth to consider changes breaking a ton of perfect working code -------- Weitergeleitete Nachricht -------- Betreff: Re: [PHP-DEV] session_start() should not reset $_SESSIOn if it's not empty Datum: Fri, 28 Jul 2017 15:37:10 +0200 Von: lists@rhsoft.net An: internals@lists.php.net Am 28.07.2017 um 14:48 schrieb Rowan Collins: > On 27 July 2017 18:03:23 BST, "lists@rhsoft.net" wrote: >> if that could work in the way that session_start() keeps the current >> state of $_SESSION if not empty it would be possible to put the >> APCU-Read and if exit($apcu_content); before session_start() which >> would >> gain another 30% performance > > I think that behaviour would confuse more people than it would help. If anything, it should be an error to access $_ SESSION if no session is currently open - if there is no session, the array has no meaning. (Arguably, all the other superglobals should be read only for the same reason, but that would be a huge break now.) make them readonly would break my whole codebase including autotests and code-coverage tools because it is legit to as example fill $_SERVER['SERVER_NAME'] with specific informations to define a straight behavior when running in cli-test-mode instead wrap every basic thing in function calls - at the curretn state a core-cms cache-hit has a total of 32 funtion calls including PHP internal ones hence that 3 bugreport are becoming a MAJOR PROBLEM because the system itself is so fast that under load after a short time you get problems with dattabase connections and with persistent connections because of the third one after the load is gone any strict-typed application jsut breaks horrible https://bugs.php.net/bug.php?id=74971 https://bugs.php.net/bug.php?id=74970 https://bugs.php.net/bug.php?id=74967