title: How to convert string to boolean php
body: <p>How can I convert string to <code>boolean</code>?</p>
  
  <pre><code>$string = 'false';
  
  $test_mode_mail = settype($string, 'boolean');
  
  var_dump($test_mode_mail);
  
  if($test_mode_mail) echo 'test mode is on.';
  </code></pre>
  
  <p>it returns,</p>
  
  <blockquote>
    <p>boolean true</p>
  </blockquote>
  
  <p>but it should be <code>boolean false</code>.</p>