title: Assign a boolean in PHP
body: <p>Why does this assignment of a variable with a boolean value fail?</p>
  
  <pre><code>$result = 1 == 2;
  </code></pre>
  
  <p>Result: $result is empty. (Expecting <code>false</code>.)<br>
  I even tried this:</p>
  
  <pre><code>$result = 1 == 2 ? true : false;
  </code></pre>
  
  <p>Result: $result is empty.<br>
  Is this just not possible in PHP?</p>
  
  <hr>
  
  <p>Edit for future reference: <code>$result</code> was in fact <code>false</code> in both cases; I simply assumed otherwise because I inspected its value by "echo"-ing it. (See comments.)</p>