The variable inside the function is a different variable from the one outside; the fact that they have the same name is a coincidence (well, not a coincidence, because it's deliberate, but incidental, anyway). Think of every variable inside foo() as having a ghostly "... belonging to function foo()" following it around.
When
function foo(&$bar)
{
unset($bar);
$bar = "blah";
}
$bar = 'something';
foo($bar);
is run it creates a variable $bar and points it to the value "something". When foo() is called a new variable $bar ("... belonging to function foo()") is created that is set to point to the same value as the original $bar.
Then unset() destroys that $bar ("... belonging to function foo()") variable. This leaves the original untouched.
Then finally an entirely new variable named $bar ("... belonging to function foo()") is created to point to the value "blah". This new variable has nothing to do with the previous one of the same name. That one has been destroyed.
Giving all these distinct variables different names to emphasise that they are different variables the code becomes
function foo(&$oink)
{
unset($oink);
$glee = "blah";
}
$bar = 'something';
foo($bar);