If you do this:
function foo() {
global $bar;
$bar = 2;
}
foo();
Then you get a global variable $bar with value 2, even if there was no such global before foo() was called.
BUT, if you do this:
function foo() {
global $bar;
$bar =& $overvar;
}
foo();
no such variable is created, even if $overvar is a global variable with a set value.
This seems wrong.
PHP4.0.3pl1