comparing references

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux