Is there a way to make all variables global?
Quick and dirty way:
$GLOBALS += get_defined_vars();
I don't know if this hack is portable (it works on PHP 5.3.1) and I suspect the objects are cloned.