Posted by "Stanislav Kuhn" on 09/02/05 13:33
Hi guys,
quick question
I need to find out if two different variables are pointing to same place...
example:
$var1 = &my_array;
$var2 = &my_array;
I need to do:
if ($var1 === $var2)
but I don't want to compare it by data, array is gonna be quite big and condition used in loop quite often.
I need something like
if (&$var1 === &$var2)
but this doesn't work...
any idea how to compare references? or how to get memory place of variable as string to be able compare if they are pointing to same place in memory?
Thanks a lot.
Stan.
[Back to original message]
|