You might want to use defines.
define('MY_VARIABLE', 'text of my var');
then in any script, including in classes or functions,
echo MY_VARIABLE;
(yes, no $) will echo
text of my var
BTW, globals suck...you should be able to find a better way to do whatever it is you're doing.