James Butler wrote:
+1 million because GLOBAL scope is horrid (generally) and is thoroughly abused
-1 million because it will be the most horrific BC break since time began and I 
imagine it will break so much code that is currently in the wild...

how hard it will be to grep for "global" and $GLOBALS?

In short I like it but I'm not sure how it would ever get implemented without 
breaking stuff... (this is where the clever core developers can propose some 
easy method I can't think of right now)

INI variable, like register_globals


-----Original Message-----
From: Andrey Hristov [mailto:p...@hristov.com] Sent: 09 December 2010 10:14
To: PHP Internals List
Subject: [PHP-DEV] Deprecating "global" + $GLOBALS, making $_REQUEST, $_GET, 
$_POST read-only

  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


Best,
Andrey

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

Reply via email to