PHP: Retrieving lines from the end of a large text file
<p>I've searched for an answer for quite a while, and haven't found anything that works correctly.</p>

<p>I have log files, some reaching <code>100MB</code> in size, around <code>140,000</code> lines of text.
With <code>PHP</code>, I am trying to get the last <code>500</code> lines of the file.</p>

<p>How would I get the <code>500</code> lines? With most functions, the file is read into memory, and that isn't a plausible case for this matter. I would preferably stay away from executing system commands.</p>
