<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: The Triple Equals in PHP</title>
	<atom:link href="http://www.jonlee.ca/the-triple-equals-in-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jonlee.ca/the-triple-equals-in-php/</link>
	<description>eat\ sleep\ code</description>
	<lastBuildDate>Sun, 18 Jul 2010 04:44:13 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Eric</title>
		<link>http://www.jonlee.ca/the-triple-equals-in-php/comment-page-1/#comment-192705</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Thu, 14 May 2009 06:19:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.jonlee.ca/the-triple-equals-in-php/#comment-192705</guid>
		<description>PHP does have some unique features and syntax.  Another one of PHP&#039;s unique features I think is interesting is variable variables, where the name of a variable can be variable:

$a = &quot;name&quot;;
$$a = &quot;Bob&quot;;

In this example, the name of the variable $$a is &quot;name&quot;.</description>
		<content:encoded><![CDATA[<p>PHP does have some unique features and syntax.  Another one of PHP&#8217;s unique features I think is interesting is variable variables, where the name of a variable can be variable:</p>
<p>$a = &#8220;name&#8221;;<br />
$$a = &#8220;Bob&#8221;;</p>
<p>In this example, the name of the variable $$a is &#8220;name&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chris</title>
		<link>http://www.jonlee.ca/the-triple-equals-in-php/comment-page-1/#comment-186511</link>
		<dc:creator>chris</dc:creator>
		<pubDate>Tue, 07 Apr 2009 10:29:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.jonlee.ca/the-triple-equals-in-php/#comment-186511</guid>
		<description>if(!$result) { .... }

;)</description>
		<content:encoded><![CDATA[<p>if(!$result) { &#8230;. }</p>
<p> <img src='http://www.jonlee.ca/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hazed</title>
		<link>http://www.jonlee.ca/the-triple-equals-in-php/comment-page-1/#comment-176884</link>
		<dc:creator>hazed</dc:creator>
		<pubDate>Tue, 10 Feb 2009 14:50:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.jonlee.ca/the-triple-equals-in-php/#comment-176884</guid>
		<description>Well explained. I always wandered the difference between == and === myself and it can be so hard to search Google for the answer (the equal sign isn&#039;t searchable). 

I&#039;ll be using this from now on to ensure that all comparisons are the same variable type. 

Thanks.</description>
		<content:encoded><![CDATA[<p>Well explained. I always wandered the difference between == and === myself and it can be so hard to search Google for the answer (the equal sign isn&#8217;t searchable). </p>
<p>I&#8217;ll be using this from now on to ensure that all comparisons are the same variable type. </p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Linda</title>
		<link>http://www.jonlee.ca/the-triple-equals-in-php/comment-page-1/#comment-155056</link>
		<dc:creator>Linda</dc:creator>
		<pubDate>Tue, 16 Sep 2008 23:15:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.jonlee.ca/the-triple-equals-in-php/#comment-155056</guid>
		<description>PHP and Javascript are not strict on variable types.

If you follow a programming practice - always to ensure that a comparison is between two variables of the same type, you really do not have to use the === sign at all.

http://www.gbandtb.com/</description>
		<content:encoded><![CDATA[<p>PHP and Javascript are not strict on variable types.</p>
<p>If you follow a programming practice &#8211; always to ensure that a comparison is between two variables of the same type, you really do not have to use the === sign at all.</p>
<p><a href="http://www.gbandtb.com/" rel="nofollow">http://www.gbandtb.com/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: charles Himmer</title>
		<link>http://www.jonlee.ca/the-triple-equals-in-php/comment-page-1/#comment-150164</link>
		<dc:creator>charles Himmer</dc:creator>
		<pubDate>Tue, 26 Aug 2008 02:54:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.jonlee.ca/the-triple-equals-in-php/#comment-150164</guid>
		<description>Javascript also uses this syntax.</description>
		<content:encoded><![CDATA[<p>Javascript also uses this syntax.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Global Nerdy &#187; Blog Archive &#187; In PHP, There&#8217;s Equality, and Then There&#8217;s EQUALITY</title>
		<link>http://www.jonlee.ca/the-triple-equals-in-php/comment-page-1/#comment-49335</link>
		<dc:creator>Global Nerdy &#187; Blog Archive &#187; In PHP, There&#8217;s Equality, and Then There&#8217;s EQUALITY</dc:creator>
		<pubDate>Thu, 13 Dec 2007 03:07:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.jonlee.ca/the-triple-equals-in-php/#comment-49335</guid>
		<description>[...] JonLee.ca: The Triple Equals in PHP [...]</description>
		<content:encoded><![CDATA[<p>[...] JonLee.ca: The Triple Equals in PHP [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rimbaud</title>
		<link>http://www.jonlee.ca/the-triple-equals-in-php/comment-page-1/#comment-2515</link>
		<dc:creator>rimbaud</dc:creator>
		<pubDate>Tue, 15 May 2007 14:16:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.jonlee.ca/the-triple-equals-in-php/#comment-2515</guid>
		<description>Thanks for the clear explanation :-)</description>
		<content:encoded><![CDATA[<p>Thanks for the clear explanation <img src='http://www.jonlee.ca/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: maurizio</title>
		<link>http://www.jonlee.ca/the-triple-equals-in-php/comment-page-1/#comment-2371</link>
		<dc:creator>maurizio</dc:creator>
		<pubDate>Sat, 12 May 2007 15:38:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.jonlee.ca/the-triple-equals-in-php/#comment-2371</guid>
		<description>:mrgreen: 
Well.. I can see at least an example where I don&#039;t need the result (for example my Alexa script).. but I imagine 1000s example where I need it
 :mrgreen:  :mrgreen:</description>
		<content:encoded><![CDATA[<p> <img src='http://www.jonlee.ca/wp-includes/images/smilies/icon_mrgreen.gif' alt=':mrgreen:' class='wp-smiley' /><br />
Well.. I can see at least an example where I don&#8217;t need the result (for example my Alexa script).. but I imagine 1000s example where I need it<br />
 <img src='http://www.jonlee.ca/wp-includes/images/smilies/icon_mrgreen.gif' alt=':mrgreen:' class='wp-smiley' />   <img src='http://www.jonlee.ca/wp-includes/images/smilies/icon_mrgreen.gif' alt=':mrgreen:' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Lee</title>
		<link>http://www.jonlee.ca/the-triple-equals-in-php/comment-page-1/#comment-2367</link>
		<dc:creator>Jon Lee</dc:creator>
		<pubDate>Sat, 12 May 2007 14:33:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.jonlee.ca/the-triple-equals-in-php/#comment-2367</guid>
		<description>That&#039;s a very good example... I would shorten it to something like this:
if (strpos(&quot;abc&quot;,&quot;d&quot;) === false)
echo &quot;blah&quot;;

Assuming you don&#039;t need $result somewhere else later... which you probably do, nevermind haha.</description>
		<content:encoded><![CDATA[<p>That&#8217;s a very good example&#8230; I would shorten it to something like this:<br />
if (strpos(&#8221;abc&#8221;,&#8221;d&#8221;) === false)<br />
echo &#8220;blah&#8221;;</p>
<p>Assuming you don&#8217;t need $result somewhere else later&#8230; which you probably do, nevermind haha.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: maurizio</title>
		<link>http://www.jonlee.ca/the-triple-equals-in-php/comment-page-1/#comment-2359</link>
		<dc:creator>maurizio</dc:creator>
		<pubDate>Sat, 12 May 2007 10:05:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.jonlee.ca/the-triple-equals-in-php/#comment-2359</guid>
		<description>I started to use === when I had to improve my script that uses strpos.

$result = strpos(&quot;abc&quot;,&quot;d&quot;);
doesn&#039;t find &quot;d&quot; in &quot;abc&quot;, so it return false

if ($result === false)
   echo &quot;blah&quot;;

You can&#039;t use == here, because false is 0, so if you look for &quot;a&quot; on the previous string, the result is 0 and the if statement (if $result == false) is true.

I hope you understand me. :-)</description>
		<content:encoded><![CDATA[<p>I started to use === when I had to improve my script that uses strpos.</p>
<p>$result = strpos(&#8221;abc&#8221;,&#8221;d&#8221;);<br />
doesn&#8217;t find &#8220;d&#8221; in &#8220;abc&#8221;, so it return false</p>
<p>if ($result === false)<br />
   echo &#8220;blah&#8221;;</p>
<p>You can&#8217;t use == here, because false is 0, so if you look for &#8220;a&#8221; on the previous string, the result is 0 and the if statement (if $result == false) is true.</p>
<p>I hope you understand me. <img src='http://www.jonlee.ca/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
