title: PHP get actual maximum upload size
body: <p>When using</p>
  
  <pre><code>ini_get("upload_max_filesize");
  </code></pre>
  
  <p>it actually gives you the string specified in the php.ini file.</p>
  
  <p>It is not good to use this value as a reference for the maximum upload size because</p>
  
  <ul>
  <li>it is possible to use so-called <a href="http://www.php.net/manual/en/faq.using.php#faq.using.shorthandbytes" rel="noreferrer">shorthandbytes</a> like <code>1M</code> and so on which needs alot of additional parsing</li>
  <li>when upload_max_filesize is for example <code>0.25M</code>, it actually is ZERO, making the parsing of the value much harder once again</li>
  <li>also, if the value contains any spaces like it is interpreted as ZERO by php, while it shows the value without spaces when using <code>ini_get</code></li>
  </ul>
  
  <p>So, is there any way to get the value actually being used by PHP, besides the one reported by <code>ini_get</code>, or what is the best way to determinate it?</p>