title: How does php cast boolean variables?
body: <p>How does php cast boolean variables?</p>
  
  <p>I was trying to save a boolean value to an array:</p>
  
  <pre><code>$result["Users"]["is_login"] = true;
  </code></pre>
  
  <p>but when I use debug the is_login value is blank.
  and when I do conditionals like:</p>
  
  <pre><code>if($result["Users"]["is_login"])
  </code></pre>
  
  <p>the conditions are always false.</p>
  
  <p>Then i tried doing this:</p>
  
  <pre><code>$result["Users"]["is_login"] = "true";
  </code></pre>
  
  <p>and it worked.</p>
  
  <p>It's not much of a big deal but when I'm returning boolean values from functions i still have to convert them to strings.</p>