469,315 Members | 1,795 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,315 developers. It's quick & easy.

Idea for PHP Enhancement: register_globals_manual

With all the problems with having register_globals = on, I propose the
following idea:

We define register_globals_manual = on as a new configuration default.

What this does is enable 3 new explicit variable declaration mechanisms
with the same syntax as the existing static and global mechanisms.

They would be httpget, httppost and session, so for example:

httpget $user_id;
httppost $credit_card;
session $really_important_stuff;

Each of these declaration lines would effectively enable
register_globals for one specific variable in one particular method
(GET, POST or session).

Creative suggestions, comments would be welcome.

EMail:<0110001100101110011000100111010101110010011 010110
11001010100000001100011011100100110000101111010011 011100
11000010111001000101110011000110110111101101101001 00000>
Jul 17 '05
50 3405
On Thu, 09 Oct 2003 07:50:03 +1300, Jochen Daum wrote:
On Wed, 08 Oct 2003 09:11:23 -0300, Gerhard Fiedler <me@privacy.net>
because it helps me to make much safer code.

However, I don't understand how register_globals could help writing
safer code.

Me neither. But it is a method of producing bug free code, because it
minimizes globals.

Can you please explain how the use of register_globals minimizes
globals? As I see it, it creates a bunch of globals that otherwise
wouldn't exist.
Jul 17 '05 #51

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.