On May 2, 12:43 am, Hendri Kurniawan <ask...@email.c omwrote:
grou...@reenie. org wrote:
Why does this test as not true.
>
if (!1==2) echo 'true'; else echo 'nottrue';
>
It seems like it should be true.
>
IMHO Operator precedence.
you are negating 1 instead the whole expression.
>
How to negate whole expression:
if (!(1==2)) echo 'true'; else echo 'nottrue';
>
Hendri Kurniawan
Ok thanks. That makes sense. Or, of course,
if (1!=2)) echo 'true'; else echo 'nottrue';
Comment