The following code doesn\'t print out anything:
$bool_val = (bool)false; echo $bool_val;
But the following code prints 1:
1
This will print out boolean value as it is, instead of 1/0.
$bool = false; echo json_encode($bool); //false