Reply to COM's approach to == vs. ===

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на 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

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