Note Submitter: phpdoc-php at lorgenetwork dot com
----
Here is a simple function which checks for reference, and works with objects by the test I did. Have now fully checked under PHP version 5.2+ and can confirm that it works for everything I could think of, including objects.
<?php
function is_reference_to(&$a, &$b)
{
if ($a !== $b)
return false; //Important.
$temp = $a;
$a = ($a === null) ? "" : null;
$res = ($b === $a);
$a = $temp;
return $res;
}
?>
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.