Reply to comparing references

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация