The following code doesn\'t print out anything:
$bool_val = (bool)false; echo $bool_val;
But the following code prints 1:
1
Your'e casting a boolean to boolean and expecting an integer to be displayed. It works for true but not false. Since you expect an integer:
true
echo (int)$bool_val;