If I understand the logic correctly, the reason your previous code didn't work is because the part inside the switch() command is evaluated against each case, so it's basically as if you're saying:
if($info2['port'] == ($info2['port']>=8 && $info2['port']<=15)) { ... }
Now, since PHP is a weakly-typed language, and since the second part of that comparison is false, PHP probably evaluated $info2['port'] as FALSE (since FALSE == 0 == FALSE), which makes that if() statement true:
if(FALSE == ($info2['port']>=8 && $info2['port']<=15)) { .. }
// since $info2['port'] isn't in that range, the right side is FALSE, leaving:
if(FALSE == (FALSE)) { ... }
Doing a switch(true), however, would work, since you're trying to see which expression in the case statements == TRUE.