PHP tmpfile() Function
Complete PHP Filesystem Reference Manual
Definition and Usage
The tmpfile() function creates a temporary file with a unique name in read/write (w+) mode.
Syntax
tmpfile()
Tips and Notes
**Note:** The temporary file is automatically deleted when the file is closed (with fclose()) or when the script ends.
**Tip:** See tempnam().
Example
The code above will output:
Testing, testing.
Complete PHP Filesystem Reference Manual