Comparing different strings in PHP with == returns true
I was just debugging a script and found that an if-statement wasn't working the way I expected it to. var_dump("6064365413078728979" == "6064365413078728452"); die(); The code above will result in the following: bool(true) With the === operator it works as expected. Anyone got any ideas why? I'm using PHP Version 5.3.13 with a wamp installation on a x64 windows machine. Hanky Panky <?php $a=6064365413078728979; $b=6064365413078728452; echo $a."<br>".$b; //var_dump( $a==$b ); die(); ?> When you run that, then on your machine that might be exceeding limit for a number and that is a numeric