Re: argv and argc on cliphp

From: Date: Sun, 05 Oct 2003 06:44:45 +0000
Subject: Re: argv and argc on cliphp
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-4676@lists.php.net to get a copy of this message
I don't really like the idea of populating two global variables, and I'm not sure where this is at right now, since I've only been following internals for the last few weeks. It's a good idea to be sure that argv and argc are always available (though, arguably, argc is not all that useful), but it would probably make more sense to put them in $_SERVER (and without the rest of the $_SERVER variables, if variables_order doesn't include "S"). You're not breaking code (since it can always use $_SERVER) and you're not introducing any globals (which goes along with the register_globals setting). Sure you are, you are creating the global $_SERVER which was specifically not enabled in your scenario.
I may be missing something, but that doesn't break any code. If you don't use it - it doesn't affect you. The chances of you using this variable for other purposes is slim to non existent. Why not always have it available there too, for the sake of people who are already getting used to living without globally registered variables? Zeev

« previous php.internals (#4676) next »