Posted by Csaba Gabor on 06/14/06 13:20
Why is it that in the following code, the third line with ($ie1==$ie2)
prints "same" while the others all show "different"? Furthermore, if
you navigate an IE instance somewhere, differing DOM elements will
compare to true under ==.
$sh1 = new COM("WScript.Shell");
$sh2 = new COM("WScript.Shell");
$ie1 = new COM("InternetExplorer.Application");
$ie2 = new COM("InternetExplorer.Application");
print ($sh1==$sh2) ? "same " : "different ";
print ($sh1===$sh2) ? "same " : "different ";
print ($ie1==$ie2) ? "same " : "different ";
print ($ie1===$ie2) ? "same " : "different ";
Csaba Gabor from Vienna
under PHP 5 on Win XP Pro
[Back to original message]
|