title: Get random boolean true/false in PHP
body: <p>What would be the most elegant way to get a random boolean true/false in PHP?</p>
  
  <p>I can think of:</p>
  
  <pre><code>$value = (bool)rand(0,1);
  </code></pre>
  
  <p>But does casting an integer to boolean bring any disadvantages?</p>
  
  <p>Or is this an "official" way to do this?</p>