Skip to content

Repository files navigation

TmpFile

Build StatusLatest Stable VersionPackagist PHP Version SupportTotal DownloadsLicense

Alternative to tmpfile() function.

Installation

You can install the latest version via Composer:

composer require denisyukphp/tmpfile

This package requires PHP 8.0 or later.

Quick usage

A temp file will be removed after PHP finished:

<?phpuseTmpFile\TmpFile;
$tmpFile = newTmpFile();
file_put_contents($tmpFile, 'Meow!');
rename($tmpFile, '/path/to/meow.txt');

Read more about temp file on Habr.

About

Alternative to tmpfile() function.

Topics

Resources

Stars

22 stars

Watchers

2 watching

Forks

Releases

Used by

Contributors

Languages