I use to report error descriptions a global variable, wich is used when displaying my HTML forms.

I know that this is stupid, but I have no idea because it doesn't works...

If I mark a variable "global", this variable refer to the global scope right? So if I declare this variable in each script function, all variables in all function will refer to the same global variable, so consequently al modifications are visible to each other.

This is not true for me...
Code:
function foo() {
  global $errdescr;

  $errdescr = "Not implemented foo()!
";
}

function main_foo() {
  global $errdescr;

  foo();
  echo "$errdescr"; /* XXX This doesn't print anything!!!!! */
}
What's wrong? I've misunderstood global directive?

Thanks...

P.S.:

I know I can use $GLOBALS['errdescr'], but I don't like to use do much time expansive expressions...