Well, technically, according to operator precedence, you are comparing the value of "$a or $b", which is a boolean, to $c, which is not.. it's like saying:
if (TRUE > 3)
{
...
}
Perhaps you were intending something more along the lines of:
if (($a > $c) or ($b > $c))
{
...
}