PHP string compare: odd result, possible type juggling, no idea why -


i'm aware numeric strings may type juggled in php, can't see why it's happening here or giving result:

$a="00010010001101000000101"; $b="00010010001101000000001";  $c = (($a == $b) ? "true" : "false"); $d = (($a === $b) ? "true" : "false");  echo $c . "  " . $d . "\n";  // true false 

but in case $a , $b defined same way, of same length, different contents many chars in. how ($a == $b) evaluating true?

it bug. test on http://3v4l.org/cmld0 .

version 4.3.1 - 5.0.5 , 5.1.1 - 5.4.3 return true false.

versions 5.4.4 - 5.5.3 return false false.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -