title: Best way to get file size of large files (> 2 GB) in PHP?
body: <p>I am working with large files in PHP, and need a RELIABLE way to get the file size of larger files over 4 GB, but PHP runs into problems with files over 2 GB... so far I have only seen solutions involving command line <code>exec</code> features, but the script will be used as a standalone console application, therefore, I am a bit hesitant to using <code>exec</code> as it might react differently on different platforms.  The only way left as I see it is reading all the data and count the bytes, but this would be VERY slow... I need a fast and reliable way that will react equally on many different computers (Linux, Windows, Mac).</p>