title: Efficiency of fopen() with 'a' option in PHP
body: <p>If I write <code>fopen($myfile, 'a')</code>, and <code>$myfile</code> is a very large file,  will the server have to read the entire file in order to return the pointer to the end of the file? Or does it quickly find the pointer to the end of the file and then return that?</p>
  
  <p>On a related note, when I then use <code>fwrite()</code> I assume it doesn't overwrite the whole file, right? It just appends stuff?</p>
  
  <p>I'm basically trying to figure out whether <code>fopen()</code> with the <code>'a'</code> option, and <code>fwrite()</code> are O(1) or O(n), where n is the length of the prexisting file.</p>