title: PHP - Get bool to echo false when false
body: <p>The following code doesn't print out anything:</p>
  
  <pre><code>$bool_val = (bool)false;
  echo $bool_val;
  </code></pre>
  
  <p>But the following code prints <code>1</code>:</p>
  
  <pre><code>$bool_val = (bool)true;
  echo $bool_val;
  </code></pre>
  
  <p>Is there a better way to print <code>0</code> or <code>false</code> when <code>$bool_val</code> is <code>false</code> than adding an <code>if</code> statement?</p>