<?php
// cf. http://php.net/manual/en/types.comparisons.php
// http://stackoverflow.com/questions/137487/null-vs-false-vs-0-in-php
function test($x){
return [$x ? 1 : 2,
$x == false ? 1 : 2,
$x === false ? 1 : 2,
(bool)empty($x)];
}