For php programmers that come from pascal,
in object pascal (delphi),
variable references are used with the "absolute" keyword.
PHP example:
<?php
global $myglobal;
$myglobal = 5;
function test()
{
global $myglobal;
$mylocal =& $myglobal;
echo "local: " . $mylocal . "\n";
echo "gloal: " . $myglobal . "\n";
}
test();
?>
Pascal example:
program dontcare;
var myglobal: integer;
procedure test;
var mylocal ABSOLUTE myglobal;
begin
write("local: ", mylocal);
write("global: ", myglobal);
end;
begin
myglobal := 5;
test;
end.
By the way, a "local" keyword in php for local variables,
could be welcome :-)