Less than operator not working correctly in PHP 5.3.1
<p>For the purpose of the example, var 2 is preset from a database as "147.22" type STRING. var 1 is calculated previously in the script and has 147.22 type FLOAT.</p>

<p>Script:</p>

<pre><code>&lt;?

$var1 = (float)$var1;
$var2 = (float)$var2;

var_dump($var1);
var_dump($var2);

if($var1 &lt; $var2) { echo "hello"; }

?&gt;
</code></pre>

<p>My expected results would be that the script NOT echo "hello" since the two values are equal in amount and type.</p>

<p>However here is the output I'm getting:</p>

<pre><code>float(197.22)
float(197.22)
hello
</code></pre>

<p>If I do not mess with the types and leave the one a float and the other a string, then it still does not work (this is how I got here in the first place).</p>

<p>If i force the values at the time of execution like this:
    

<pre><code>$var1 = 147.22;
$var2 = 147.22;

var_dump($var1);
var_dump($var2);

if($var1 &lt; $var2) { echo "hello"; }

?&gt;
</code></pre>

<p>I get this, (and it works):</p>

<pre><code>float(197.22)
float(197.22)
</code></pre>

<p>Notice no "hello"....</p>

<p>Anyone have any clue wth is going on here?</p>
