using the ! (not operand) will only work properly for a boolean expression, if you try it in another case like mentioned above: !$a < $b you wont get the expected results.
if you have this:
$a = 7;
echo !$a; //prints nothing but evals BOOL false
so to translate
$a = 7;
if (!$a < $b)
would be equal to saying
if (0 < $b)
!$a will always be 0 or false unless $a itself is 0 or false, in that case it will return 1 (true).
furthermore, you can study this:
$color = "blue";
$shape = "circle";
if( ($color == "blue") && ($shape == "square") )
the above if turns into:
if( (TRUE) && (FALSE) )
which evaluates in whole to false.
but if you had this:
if( ($color == "blue") && !($shape == "square") )
the above turns to:
if( (TRUE) && !(FALSE) )
which becomes:
if( (TRUE) && (TRUE) )
so the whole thing evaluates true.
so you can see ! negates the following boolean result.
for example you can have:
$color = "something";
if(!isset($color))
"if not isset(color)"
evals false, because isset color evals true and then it gets negated so it becomes false.
hope that helped also.