See the Conditional Operator, to understand the above better.
In reply to Re: Better expression for $x = !!$y||0 by ghenry in thread Better expression for $x = !!$y||0 by borisz