471,854 Members | 1,911 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,854 software developers and data experts.

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.

--
Spam:newsgroup(at)cr*********@verisign-sux-klj.com
EMail:<0110001100101110011000100111010101110010011 010110
11001010100000001100011011100100110000101111010011 011100
11000010111001000101110011000110110111101101101001 00000>
Jul 17 '05
50 3562
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>
wrote:
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 Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.