The current support for references is mediocre at best. For instance:
$variable = "foobar";
//This form of new assignment should be the default
$a = & new foobar();
$b = & new foobar();
$b->variable = "Hello";
$array = array(&$a, &$b);
//The foreach construct uses copies instead of references.
foreach ($array as $element)
$element->variable = "Hi";
echo $a->variable; //echoes "foobar"
echo $b->variable; //echoes "Hello";
//In order for the above to work, a loop is required.
for ($i = 0, $count = count($array); $i < $count; $i++)
$element = &$array[$i]; //shown ...