Am 29.07.2017 um 08:47 schrieb Thomas Hruska:
On Fri, Jul 28, 2017 at 11:03 AM, li...@rhsoft.net <li...@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: li...@rhsoft.net <li...@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: li...@rhsoft.net <li...@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, "li...@rhsoft.net" <li...@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
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php