Note you can also use the '!' to convert a number to a boolean, as if it was an explicit (bool) cast then NOT.
So you can do something like:
<?php
$t = !0; $f = !1; ?>
And non-integers are casted as if to bool, then NOT.
Example:
<?php
$a = !array(); $a = !array('a'); $s = !""; $s = !"hello"; ?>
To cast as if using a (bool) you can NOT the NOT with "!!" (double '!'), then you are casting to the correct (bool).
Example:
<?php
$a = !!array(); $status = (!!$array ? 'complete' : 'incomplete');
$s = !!"testing"; ?>