rewind

It rewinds the position of a file pointer

Example

<?php

$fp = fopen(‘test.txt’, ‘r+’);

fwrite($fp, ‘PHPCodez’);

rewind($fp);

fwrite($fp, ‘phpcodez’);

fclose($fp);

?>