I've read php.net's explanation of superglobals but could I just confirm my understanding is correct...
1) With PHP v4.2.0, register_globals has been set to "off" which stops PHP predefining variables, e.g. variables submitted via a form for example must be accessed using $_POST('var') instead of just using $var.
2) Will the following function (to loop through an array) work regardless of the register_globals setting?
function add_article()
{
for ($i=0; $i<=5; $i++)
{
echo $GLOBALS['keywords'][$i];
}
}
3) A question like "Can I still use the superglobal array $GLOBALS if register_globals is off?" is missing the point because that's why superglobals exist in the first place - because register_globals is off. Correct?
4) Will I have to go through old code and explicity use $GET, $POST and other superglobals if I don't want the code to break?
5) I've seen $_GLOBALS used instead of $GLOBALS. I assume the former is a typo?
Thanks for clarifying this for me.