Re: Changes to SuperGlobals for PHP 8
| From: | lists@rhsoft.net | Date: | Sat, 29 Jul 2017 13:04:18 +0000 |
| Subject: | Re: Changes to SuperGlobals for PHP 8 | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-100099@lists.php.net to get a copy of this message | ||
Am 29.07.2017 um 08:47 schrieb Thomas Hruska:
On Fri, Jul 28, 2017 at 11:03 AM, lists@rhsoft.net <lists@rhsoft.net> wrote: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 <lists@rhsoft.net> An: internals@lists.php.net Am 28.07.2017 um 18:21 schrieb Kalle Sommer Nielsen: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
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 avoidedwrong 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 <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" <lists@rhsoft.net> wrote:
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=74967if 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% performanceI 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.)