tmpfile

It creates a temporary file

Example

<?php

$fp = tmpfile();

fwrite($fp, “phpccodez”);

rewind($fp);

echo fread($fp,1024);

fclose($fp);

?>

Output

phpccodez