Why do the following string comparisons return true?
I am using Laravel framework 4.2, the Form::select compares the option value using this method and it's find matches that shouldn't be.
public function testStringComparison1()
{
$value = '8000003E-1408739159';
$selected = '8000010E-1434656519';
$b = false;
if ((string) $value == (string) $selected) {
$b = true;
}
$this->assertFalse($b); // this fails, $b == true
}
public function testStringComparison2()
{
$value = '8000008E-1408740949';
$selected = '8000010E-1434656519';
$b = false;
if ((string) $value == (string) $selected) {
$b = true;
}
$this->assertFalse($b); // this fails, $b == true
}