How to use $_FILES["file"]["size"]?
To keep code clear, I often define units as constants:
define('KB', 1024);
define('MB', 1048576);
define('GB', 1073741824);
define('TB', 1099511627776);
Then you can simply do your condition like
if ($_FILES['file']['size'] < 5*MB)
5MB -> 5 * 1024 * 1024 bytes
or... if you're a storage vendor, then it's actually 5 * 1000 * 1000.