in reply to Better expression for $x = !!$y||0

I'd go for $y ? 1 : 0. Other suggestions, like !!$y || 0 or 1 - !$y may not return 0 or 1 if $y has overload magic.

It also doesn't require the reader to know that negating a false value returns 1 (and not some other true value).