else
statement because the float
numbers are differentif (strval(0.000000000035436064) == strval(0.000000000035436064000001)) {
echo 'if';
} else {
echo 'else';
}
But if we add one 0
in front of the last digit of the second number, then if
statement will be executedif (strval(0.000000000035436064) == strval(0.0000000000354360640000001)) {
echo 'if';
} else {
echo 'else';
}
Note: The above code is one of the best solutions to compare float numbers