PHP has references and aliases AFAIK. A reference only really applies to functions.
$foo = "blah";
f(&$foo);
print $foo; // prints "unblah"
g($foo);
print $foo; // prints "notblah"
function f($bar) {
$bar = "unblah";
}
function g(&$bling) {
$bling = "notblah";
}
You can tell it to use a reference in the function or in the function call.
For aliases you're just creating two aliases that point to exactly the same thing. I think that all variables in PHP are pointers that are automatically followed. So an alias is like having two identical pointers.
$ding = "dong";
$mink =& $ding;
$mink = "monk";
print $ding; // print "monk";
unset($ding);
print $mink;
/ still works. unset removes the 'pointer' $ding but since the pointer $mink still exists the data that it points to isn't garbage collected. /
Somebody correct me on this if it isn't the case.
Ryan