I am using a switch statement to test the return on a function. The function can return TRUE, FALSE or -1 for an error. It appears that the switch statement uses == instead of === for the compare as TRUE and -1 (both non zero values) execute the same TRUE case statement. Is there a way around this? Example below.
switch(x()){
case TRUE:
echo("T");
break;
case FALSE:
echo("F");
break;
case -1:
echo("Error");
break;
}