Can I find out if a variable is defined in the global space based on its value and name?
===

I know the variable name, like `$var` and its value.

If I check for `isset($GLOBALS[$var_name]) && $GLOBALS[$var_name] == $var` I may get a positive result even if the variable is not really global, but happens to have the same name and value as an existing global variable :(

I need this for a debug function that I'm building, to display more info about the type of the variable that was passed.

Could I also find out if a variable is static? :)

ps: reflection doesn't help me.. It can only get info for objects or functions...