PHP implementation of booleans is flawed in my opinion, but that is because of the non-typedness of the language. Therefore the '===' operator has been created. Which doesn't work for me half of the time either.
A variable is not false when it has a non-zero value. So if $FIRST = FALSE; , $FIRST is a non-zero value and therefor true!
I would not rely on this mechanism. A few alternatives:
PHP Code:
$FIRST=TRUE;
if ($FIRST === TRUE)
Not recommended because I have seen in failing.
PHP Code:
$FIRST=1
if ($FIRST)
Will work, but relies on the implementation of boolean evaluation.
PHP Code:
$FIRST=1
if ($FIRST == 1)
Best. Unambiguous. Works always.
jlinkels