title: PHP map file into virtual memory
body: <p>I am using PHP to handle some large files (around 500MB to 2 GB) where I need to write to small sections in unpredictable positions in the file. Is there a way to map the file to virtual memory so I do not have to make a <code>fwrite()</code> or <code>fread()</code> call? The major caveat is that it will be reading small chunks, but will be accessing a large amount of data in total, all within one file.</p>