PHPackages                             mikehaertl/php-tmpfile - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. mikehaertl/php-tmpfile

ActiveLibrary[File &amp; Storage](/categories/file-storage)

mikehaertl/php-tmpfile
======================

A convenience class for temporary files

1.3.0(1y ago)9731.5M↓42.3%17[1 issues](https://github.com/mikehaertl/php-tmpfile/issues)[3 PRs](https://github.com/mikehaertl/php-tmpfile/pulls)20MITPHPCI failing

Since Jul 9Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mikehaertl/php-tmpfile)[ Packagist](https://packagist.org/packages/mikehaertl/php-tmpfile)[ RSS](/packages/mikehaertl-php-tmpfile/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (10)Dependencies (1)Versions (16)Used By (20)

php-tmpfile
===========

[](#php-tmpfile)

[![GitHub Tests](https://github.com/mikehaertl/php-tmpfile/workflows/Tests/badge.svg)](https://github.com/mikehaertl/php-tmpfile/actions)[![Packagist Version](https://camo.githubusercontent.com/0aa9a651fe13e5958d32f19b65de104c2761cf0fe3ebedc3cc776e143f72aa43/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d696b6568616572746c2f7068702d746d7066696c653f6c6162656c3d76657273696f6e)](https://packagist.org/packages/mikehaertl/php-tmpfile)[![Packagist Downloads](https://camo.githubusercontent.com/31f8a651fa06f13e2b454cec3577cb01fcef1d1a8a745b065cb80f116cb400f9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d696b6568616572746c2f7068702d746d7066696c65)](https://packagist.org/packages/mikehaertl/php-tmpfile)[![GitHub license](https://camo.githubusercontent.com/cc32c7123fb29c5817a6bd7b7b5e0663694e896055f0e243c97bcdfc9af82495/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d696b6568616572746c2f7068702d746d7066696c65)](https://github.com/mikehaertl/php-tmpfile/blob/master/LICENSE)

A convenience class for temporary files.

Features
--------

[](#features)

- Create temporary file with arbitrary content
- Delete file after use (can be disabled)
- Send file to client, either inline or with save dialog, optionally with custom HTTP headers
- Save file locally

Examples
--------

[](#examples)

```
