What values were you expecting?
PHP Code:
$GLOBALS['yetanothertest'] =& $test;
Assigns the global variable by to reference to the local variable to test; it's not affecting $yetanothertest in the local scope of the function.
and
PHP Code:
$anothertest =& $test;
Is only affecting the reference of the
local variable $anothertest...$anothertest does not have scope after the function call, however, if you assigned a value to the variables as you mentioned...it will affect all the variables that reference that data.
I know I'm not explaining it that well, there's a section in the PHP manual dedicated to explaining references over at php.net.