mercredi 10 juin 2020

comparing strings with -0 fail

I cannot manage to do a succesful comparison with the string "-0"

if(strval("-0") == strval("0")) {
    echo '"-0" seems to be same "0"';
}

Result:

"-0" seems to be same "0"

What am I missing here?

And more important, how to work around this?

Aucun commentaire:

Enregistrer un commentaire