Alternative to tmpfile() function

Overview

TmpFile

Build Status Latest Stable Version Packagist PHP Version Support Total Downloads License

Alternative to tmpfile() function.

Installation

You can install the latest version via Composer:

composer require denisyukphp/tmpfile

This package requires PHP 7.2 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.

You might also like...
Shortest Path - have a function ShortestPath (strArr) take strArr which will be an array of strings which models a non-looping Graph.

Have the function ShortestPath(strArr) take strArr which will be an array of strings which models a non-looping Graph

PHP Class Encoding featuring popular Encoding::toUTF8() function --formerly known as forceUTF8()-- that fixes mixed encoded strings.
PHP Class Encoding featuring popular Encoding::toUTF8() function --formerly known as forceUTF8()-- that fixes mixed encoded strings.

forceutf8 PHP Class Encoding featuring popular \ForceUTF8\Encoding::toUTF8() function --formerly known as forceUTF8()-- that fixes mixed encoded strin

Laravel & MySQL, jQuery, Ajax, Bootstrap. Also, it's include email send function without any API.
Laravel & MySQL, jQuery, Ajax, Bootstrap. Also, it's include email send function without any API.

Rewards-Dacor Laravel & MySQL, jQuery, Ajax, Bootstrap. Also, it's include email send function without any API. [Live site link] ( https://rewardsdaco

WooCommerce function and class declaration stubs for static analysis.

WooCommerce Stubs This package provides stub declarations for WooCommerce functions, classes and interfaces. These stubs can help plugin and theme dev

Making multiple identical function calls has the same effect as making a single function call.

Making multiple identical function calls has the same effect as making a single function call.

PHP APM (Alternative PHP Monitor)

APM (Alternative PHP Monitor) APM (Alternative PHP Monitor) is a monitoring extension enabling native Application Performance Management (APM) for PHP

A Chainable, REST Friendly, PHP HTTP Client. A sane alternative to cURL.

Httpful Httpful is a simple Http Client library for PHP 7.2+. There is an emphasis of readability, simplicity, and flexibility – basically provide the

An alternative Redis session handler for PHP featuring per-session locking and session fixation protection

RedisSessionHandler An alternative Redis session handler featuring session locking and session fixation protection. News phpredis v4.1.0 (released on

 Mira - A lightweight WebUI alternative to top/htop for GNU/Linux.
Mira - A lightweight WebUI alternative to top/htop for GNU/Linux.

Mira Mira lets you monitor your server's resource usage through a responsive WebUI. ======== Introduction Screenshots Installation Limitations Known I

A much faster alternative to youtube-dl built for PHP applications.
A much faster alternative to youtube-dl built for PHP applications.

youtube-downloader This project was inspired by a very popular youtube-dl python package: https://github.com/rg3/youtube-dl Yes, there are multiple ot

FreeScout — Free self-hosted help desk & shared mailbox (Zendesk / Help Scout alternative)
FreeScout — Free self-hosted help desk & shared mailbox (Zendesk / Help Scout alternative)

Free Self-Hosted Zendesk & Help Scout Alternative FreeScout is the super lightweight free open source help desk and shared inbox written in PHP7+ (Lar

Alternative image provider for fakerphp using picsum.photos

Fakerphp Picsum Images Introduction Alternative image provider for fakerphp using picsum.photos This package has been forked from mmo/faker-images for

Registry manager for Laravel 5. An alternative for managing application configurations and settings.

Registry manager for Laravel 5. An alternative for managing application configurations and settings. Now with the magic of caching, so no more database calls to simply get site setting.

A Statamic Pro addon that provides alternative GraphQL queries for collections, entries and global sets.

Statamic Enhanced GraphQL A Statamic CMS GraphQL Addon that provides alternative GraphQL queries for collections, entries and global sets. ⚠️ This is

Paperwork - OpenSource note-taking & archiving alternative to Evernote, Microsoft OneNote & Google Keep
Paperwork - OpenSource note-taking & archiving alternative to Evernote, Microsoft OneNote & Google Keep

Paperwork Paperwork is an open-source, self-hosted alternative to services like Evernote®, Microsoft OneNote® or Google Keep® iframe src="https://pla

A self-hosted alternative to putting your code snippets on Gist.
A self-hosted alternative to putting your code snippets on Gist.

WP-Gistpen Contributors: JamesDiGioia Donate link: http://jamesdigioia.com/ Tags: gist, code snippets, codepen Requires at least: 5.2 Requires PHP: 5.

Calibre OPDS (and HTML) PHP Server : web-based light alternative to Calibre content server / Calibre2OPDS to serve ebooks (epub, mobi, pdf, ...)

COPS COPS stands for Calibre OPDS (and HTML) Php Server. See : COPS's home for more details. Don't forget to check the Wiki. Why ? In my opinion Calib

Articulate - An alternative ORM for Laravel, making use of the data mapper pattern

Articulate Laravel: 8.* PHP: 8.* License: MIT Author: Ollie Read Author Homepage: https://ollie.codes Articulate is an alternative ORM for Laravel bas

Owner
Aleksandr Denisyuk
PHP Developer
Aleksandr Denisyuk
An alternative Redis session handler for PHP featuring per-session locking and session fixation protection

RedisSessionHandler An alternative Redis session handler featuring session locking and session fixation protection. News phpredis v4.1.0 (released on

Marcel Hernandez 117 Oct 19, 2022
A self-hosted alternative to putting your code snippets on Gist.

WP-Gistpen Contributors: JamesDiGioia Donate link: http://jamesdigioia.com/ Tags: gist, code snippets, codepen Requires at least: 5.2 Requires PHP: 5.

Intraxia 71 Nov 15, 2022
Calibre OPDS (and HTML) PHP Server : web-based light alternative to Calibre content server / Calibre2OPDS to serve ebooks (epub, mobi, pdf, ...)

COPS COPS stands for Calibre OPDS (and HTML) Php Server. See : COPS's home for more details. Don't forget to check the Wiki. Why ? In my opinion Calib

Sébastien Lucas 1.3k Jan 1, 2023
An article about alternative solution for convert object into a JSON Object for your api.

Do we really need a serializer for our JSON API? The last years I did build a lot of JSON APIs but personally was never happy about the magic of using

Alexander Schranz 1 Feb 1, 2022
Highly customizable alternative to var_export for PHP code generation

PHP Variable Exporter PHPEncoder is a PHP library for exporting variables and generating PHP code representations for said variables similar to the bu

Riikka Kalliomäki 71 Dec 30, 2022
An alternative to run cron jobs that uses simple HTTP requests

SilverStripe Simple Jobs An alternative to run cron jobs that uses simple HTTP requests. This module require SilverStripe CronTask. Why? Configuring c

Thomas Portelange 1 Jul 4, 2022
Ethereal Billing System is meant to be used as a personal alternative to WHMCS.

Ethereal Billing System is meant to be used as a personal alternative to WHMCS. In no way is this as good or even better than WHMCS apart from the fact that is free and open source to the public.

Qrow 8 Dec 31, 2022
This Repository contains a custom Workflow for Alfred which provides the function to instantly search in the Magento 2 DevDocs

Introduction Add the custom search to your Alfred Workflow and have a quicker access to the Magento 2 DevDocs. Installation Just download the alfredwo

David Lambauer 10 Jun 29, 2022
Composer Plugin for automatically including files for easing function usage in php.

Php Inc Php inc is a composer plugin for automatically including certain files into composer's autoload and autoload-dev files config. Given a set of

Krak 5 Jan 11, 2022
TWINS FUNCTION IN PHP

TWINS FUNCTION IN PHP During a test, I was faced with this problem of checking if two strings are twins. I couldn't finish the problem in time so I de

Stephanot Zaf 1 Jan 22, 2022