title: $_FILES['']['size'] - does PHP check file size on server side?
body: <p>when a file is uploaded using a PHP script, which is the best way to check file size?</p>
  
  <p><code>$_FILES['']['size']</code> OR <code>filesize()</code>?</p>
  
  <p>the value in <code>$_FILES['']['size']</code> - does PHP check the file size in the server, or is it the value sent by the browser while uploading the file?</p>
  
  <p><code>$_FILES['']['type']</code> - is the value sent by the browser, and has a security problem while uploading the file. is <code>$_FILES['']['size']</code> like this?</p>