By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,978 Members | 1,831 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,978 IT Pros & Developers. It's quick & easy.

Idea for PHP Enhancement: register_globals_manual

P: n/a
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
Share this Question
Share on Google+
50 Replies


P: n/a
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

50 Replies

This discussion thread is closed

Replies have been disabled for this discussion.