it is a bit confusing, ill use an example from a comment on the page to try to explain it...
<?
//obscvresovl at NOSPAM dot hotmail dot com
$var = 1;
$num = NULL;
function &blah()
{
$var =& $GLOBALS["var"]; # the same as global $var;
$var++;
return $var;
}
$num = &blah();
echo $num; # 2
blah();
echo $num; # 3
?>
normally when a function 'return's a value, a copy of the value is made and whatever variable is catching the assignment gets a copy of the value.
i.e.
function x() {
$x = 5;
return $x; //return a copy of $x
}
$var = $x; //$var receives the copy
if you use a reference, what it does is not return a copy, but the variable receiving the return will become a reference to the function.
in relation to the first example this means that the memory address of $num, after the first call to blah() will be assigned as a reference to the return of the function. that way, when a value is returned from the reference, a copy is not made, but the value is returned to the memory address of $num.
thats why he can call blah() later with no lvalue needed. return $var is actually taking the memory address of $num and storing the contents there.
sort of hypothetically, returning a reference tells php to actually think about where to put the return value, whereas a regular return just blindly hands off a copy of the return value. when you make a reference php actually remembers where it was placed in the first place, so on subsequent calls it can then give the return value back to the same place (memory address).
i hope it made sense its kinda hard for me to explain, just one of the things you can see in your head but cant put to words easily.