title: What kind of file types does PHP getimagesize() return?
body: <p>Does anyone know all the possible results for the 3rd value returned from PHP's getimagesize() function? Example this code below will return:</p>
  
  <ul>
  <li><code>$imageinfo['2'] = 2;</code> for a <code>jpg</code> image,</li>
  <li><code>$imageinfo['2'] = 3;</code> for a <code>png</code> image,</li>
  <li><code>$imageinfo['2'] = 0;</code> for a <code>gif</code> image.</li>
  </ul>
  
  <p>The numbers might not be correct above but you get the idea.</p>
  
  <p>I can't find on php.net or anywhere else a list of all possible results for the 3rd value.</p>
  
  <pre><code>$imageinfo = getimagesize($imageurl);
  $image_type  = $imageinfo['2'];
  </code></pre>