in reply to if and else

The output of the second snippet is NOT what you say it is. It is "FALSETRUE". Which gives a hint to what happens. Which (as has already been said by another poster) is that you're evaluating (0) or print "FALSE" to decide whether to print "TRUE". And since printing "FALSE" is true, you're printing "TRUE" afterwards.

Incidentally the built in trinary function does exactly what you are trying to do. The pattern for that looks like this:

CONDITION ? do_if_true() : do_if_false();
So your intended behavior can be seen from:
0 ? print "TRUE" : print "FALSE";
Or more concisely with:
print( 0 ? "TRUE" : "FALSE" );