Boolean expression in PHP?

Posted by user198729 on Stack Overflow See other posts from Stack Overflow or by user198729
Published on 2010-05-06T06:10:22Z Indexed on 2010/05/06 6:28 UTC
Read the original article Hit count: 213

Filed under:

case 1:

echo false  . 'test';

output:

test

case 2:

echo true  . 'test';

output:

1test

Why true cast to 1 but false nothing?

© Stack Overflow or respective owner

Related posts about php