denisyukphp / tmpfile
Alternative to tmpfile() function.
Installs: 3 237
Dependents: 1
Suggesters: 0
Security: 0
Stars: 22
Watchers: 2
Forks: 1
Open Issues: 1
Requires
- php: ^8.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.10
- php-parallel-lint/php-console-highlighter: ^1.0
- php-parallel-lint/php-parallel-lint: ^1.3
- phpunit/phpunit: ^9.5
- psalm/plugin-phpunit: ^0.17.0
- vimeo/psalm: ^4.26
Suggests
- denisyukphp/tmpfile-manager: Allows more advanced creating and removing temp files.
README
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:
<?php use TmpFile\TmpFile; $tmpFile = new TmpFile(); file_put_contents($tmpFile, 'Meow!'); rename($tmpFile, '/path/to/meow.txt');
Read more about temp file on Habr.