Am 30.07.2017 um 01:35 schrieb Kalle Sommer Nielsen:
2017-07-29 22:17 GMT+02:00 Stanislav Malyshev <smalys...@gmail.com>:
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"

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to