title: How does "do something OR DIE()" work in PHP?
body: <p>I'm writing a php app to access a MySQL database, and on a tutorial, it says something of the form</p>
  
  <pre><code>mysql_connect($host, $user, $pass) or die("could not connect");
  </code></pre>
  
  <p>How does PHP know that the function failed so that it runs the die part? I guess I'm asking how the "or" part of it works. I don't think I've seen it before.</p>