In my personal opinion it would be better practise to pass the relevant variables along to the function in the paremeters:
function add(&$var)
{
$var++;
}
add($var);
that way you always know which variables are used by a function, and which variables a function can and cannot change in the global scope.
Also, if you have a lot of session variables that you want to use in a function, you can cheat by passing the $HTTP_SESSION_VARS[] array to the function.
This is an associative array containing all the session variables.
$HTTP_SESSION_VARS['var'];