Re: Deprecating "global" + $GLOBALS, making $_REQUEST, $_GET, $_POST read-only
| From: | Reindl Harald | Date: | Thu, 09 Dec 2010 10:19:51 +0000 |
| Subject: | Re: Deprecating "global" + $GLOBALS, making $_REQUEST, $_GET, $_POST read-only | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-50922@lists.php.net to get a copy of this message | ||
Please do not
global + GLOBALS can be used in so many ways and you would break
200.000 LOC only here which is running with reporting E_STRICT
in a production environment
The same for making $_GET/$_POST/$_REQUEST readonly
I know that it is not best practice, but sometimes
it makes life easier to fetch $_POST in a method
which overwrites a parent method and add a single
item before the parent is processing $_POST
Yes, there are many other ways to do the same but
BC-breaking trigger a lot of work and testing
Am 09.12.2010 11:14, schrieb Andrey Hristov:
> Hi guys,
> the topic says most of it. What do you think about deprecating the global keyword and $GLOBALS
> with it? Together
> with this making $_REQUEST, $_GET and $_POST read-only as they should be used only to read-only
> anyway.
>
> The reason for global + GLOBALS is that these are abused and which leads to spaghetti programs,
> when used by
> unexperienced users. Also they have impact on side effects from functions that don't only
> rely their parameters.
>
> Best,
> Andrey
--
Mit besten Grüßen, Reindl Harald
the lounge interactive design GmbH
A-1060 Vienna, Hofmühlgasse 17
CTO / software-development / cms-solutions
p: +43 (1) 595 3999 33, m: +43 (676) 40 221 40
icq: 154546673, http://www.thelounge.net/
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc