Global variables are only deprecated to prevent people using them all the time and promoting code that is hard to read and follow.
Passing by references in that way is reversing the point of them in my view, given the nature of PHP is to have code generated on a 'per page' basis, rather than as a single app, as you would in a standalone executable in C/C++/C#/Java. Normally you would use it to affect a complex type like another class that exists outside of a second class from within that class. The only real-world use I've found for it is in passing my Smarty class into another class' method so I can assign variables in a reusable code block.
As to the use of $SESSION vs. $GLOBALS well the $GLOBALS variables are only global in the scope of the current page (that I know of). By using $SESSION you can retain your value as a cookie while the user's viewing each page, which is really what most global variable use would tend to be about in the world of websites and PHP, surely?