02-15-2008, 07:40 PM
|
#10 (permalink)
|
|
The Frequenter
Join Date: Dec 2007
Location: Bucharest, Romania
Posts: 438
Thanks: 3
|
Just to clear something up. The ampersand operator (not the equal-ampersand operator) is used to return the memory handle of a variable/object/what ever. Therefore, all the following assignments are valid:
Code:
$a =& $x;
$a = &$x;
$a = & $x;
// and so on...
And to make it more clear, $a and $x are not equal. They just point to the same memory address. $x contains a value, while $a contains only the memory address in which the value of $x is stored.
Sounds confusing, but it's not.
__________________
I have optimistic thoughts, even though sometimes (if not always) life's a bitch.
|
|
|
|