determine image file size php
<p>I have this code for checking max image size allowed: The one below is for 4 MB</p>

<pre><code>elseif (round($_FILES['image_upload_file']["size"] / 1024) &gt; 4096) {
$output['error']= "You can upload file size up to 4 MB";
</code></pre>

<p>I don't understand this calculation and approaches from the internet is making it more confusing</p>

<p>I wanted the size for</p>

<ul>
<li>8 MB</li>
</ul>