Now we have implemented our very own file stream. The script that uses it might look like this:

<?php
$fp 
example_open("/path/to/file");
fwrite($fp"hello there\n");
rewind($fp);
echo 
fgets($fp);
?>
Outputs:

hello there
Key points: