title: Convert String 'true' or 'false' to interger '1' or '0'
body: <p>I want to convert String variable 'true' or 'false' to int '1' or '0'.</p>
  <p>To achieve this I'm trying like this</p>
  <pre><code>(int) (boolean) 'true' //gives 1
  (int) (boolean) 'false' //gives 1 but i need 0 here
  </code></pre>
  <p>I now I can using array like <code>array('false','true');</code>
  or using <code>if($myboolean=='true'){$int=1;}</code></p>
  <p>But this way is less efficient.</p>
  <p>Is there another more efficient way like this <code>(int) (boolean) 'true'</code> ?</p>
  <h3>I know this question has been asked. but I have not found the answer</h3>