title: Handle error when getimagesize can't find a file
body: <p>when I'm trying to <code>getimagesize($img)</code> and the image doesn't exist, I get an error. I don't want to first check whether the file exists, just handle the error.</p>
  
  <p>I'm not sure how <code>try catch</code> works, but I want to do something like:</p>
  
  <pre><code>try: getimagesize($img) $works = true
  catch: $works = flase
  </code></pre>