takuya/php-mktempfile

1.1 2024-03-14 18:10 UTC

This package is auto-updated.

Last update: 2024-05-10 16:12:12 UTC


README

Make a Temp file in SysTemp with temp_name and auto removed.

mktempfile function

This package provides a function mktempfile() to your composer project.

<?php
require_once 'vendor/autoload.php';
$temp_file = mktempfile();
file_exists($temp_file);#=>true

$temp_file will be auto remove

$temp_file will be auto removed by 'register_shutdown_function'.

system temp directory

mktempfile() make file in SystemTemp by 'sys_get_temp_dir()'.

Installing from GitHub.

composer config repositories.takuya/php-mktempfile vcs https://github.com/takuya/php-mktempfile
composer require takuya/php-mktempfile

Installing with packagist.

composer require takuya/php-mktempfile
composer install

test results.

<CircleciTest>

testing

composer install 
./vendor/bin/phpunit