<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sun, 19 May 2013 15:00:59 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Evert Pot's Blog: Numeric string comparison in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16249</guid>
      <link>http://www.phpdeveloper.org/news/16249</link>
      <description><![CDATA[<p>
In <a href="http://www.rooftopsolutions.nl/blog/numeric-string-comparison-in-php">this new post</a> to his blog <i>Evert Pot</i> reminds you (the PHP developer) about the loose and strict typing checks that you need to do when checking the values of your variables and never just assume. PHP's loose typing tendencies can cause issues if you're not paying attention.
</p>
<blockquote>
As long as you make sure you always use strict checking (=== and !==) where you can, and fall back to the loose checks when you must. As a PHP developer, I think it's very important to understand and memorize exactly how these work, whether you're writing new code, or maintaining existing code.
</blockquote>
<p>
He points out a specific example of some code that seems counter-intuitive when you compare how it reads and how it actually works (strings converted to floats and evaluated)
</p>
<blockquote>
The moral is: always do strict checks when you are able to.
</blockquote>]]></description>
      <pubDate>Tue, 26 Apr 2011 09:23:47 -0500</pubDate>
    </item>
  </channel>
</rss>
