[php]
$a = exec(“a.out1 <input1”);
$b = exec(“a.out2 <input2”);
if(strcmp($a,$b)==0){
…
}
else{
// this always executes
…
} [/php]
The two strings $a and $b are both “Miles per gallon = 10”.
I have checked both variables using var_dump(bin2hex($a)) and get
dump1= string(42) “4d696c6573207065722067616c6c6f6e203d203130”
dump2= string(42) “4d696c6573207065722067616c6c6f6e203d203130”
Any idea on what’s happening?