The following code doesn\'t print out anything:
$bool_val = (bool)false; echo $bool_val;
But the following code prints 1:
1
function dump_condition($condition){ if($condition){ return "true"; } else { return "false"; } }
use on script
echo dump_condition(1>0); // print "true" echo dump_condition(1<0); // print "false"