4 // Create two temporary files.
6 function main_stream_copy_to_stream_seek() {
9 fwrite($file1, 'input');
10 fwrite($file2, 'before');
12 // Seek to specific position in destination.
16 stream_copy_to_stream($file1, $file2);
18 // Show us all of file2.
19 echo stream_get_contents($file2, -1, 0);