PHPackages                             icecave/temptation - 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. icecave/temptation

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

icecave/temptation
==================

Painless temporary files and directories that clean up after themselves.

1.0.0(11y ago)129.4k2MITPHPPHP &gt;=5.3

Since Oct 2Pushed 7y ago2 watchersCompare

[ Source](https://github.com/icecave/temptation)[ Packagist](https://packagist.org/packages/icecave/temptation)[ Docs](https://github.com/IcecaveStudios/temptation)[ RSS](/packages/icecave-temptation/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (3)Versions (3)Used By (2)

Temptation
==========

[](#temptation)

[![Build Status](https://camo.githubusercontent.com/556110ae2bc74412e9cbd2217543dde43c98db8412960c09050716c3742e22e6/687474703a2f2f696d672e736869656c64732e696f2f7472617669732f696365636176652f74656d70746174696f6e2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/icecave/temptation)[![Code Coverage](https://camo.githubusercontent.com/2aac0b181921276bfd0c2a32c7b526b91d72126e607580f52af219c1cb8a58c6/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f696365636176652f74656d70746174696f6e2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://codecov.io/github/icecave/temptation)[![Latest Version](https://camo.githubusercontent.com/21e229714e112470f4b09d4313195665f06313292c3bb666ba92dd9818d2de8f/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696365636176652f74656d70746174696f6e2e7376673f7374796c653d666c61742d737175617265266c6162656c3d73656d766572)](https://semver.org)

**Temptation** is a simple PHP library for creating temporary files and directories that clean up after themselves.

```
composer require icecave/temptation

```

Example
-------

[](#example)

```
use Icecave\Temptation\Temptation;

// Use the temptation object to create files and directories ...
$temptation = new Temptation();

// Create a temporary file ...
$file = $temptation->createFile();

// Use the temporary file ...
file_put_contents($file->path(), 'This is my temp file.');

// Don't do anything else!
// The temporary file is automatically deleted when the $file object goes out of scope.
```

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~341 days

Total

2

Last Release

4317d ago

Major Versions

0.1.0 → 1.0.02014-09-09

### Community

Maintainers

![](https://www.gravatar.com/avatar/93a71bd75fcd51efee464532dbdd54927cd00e938805998c76e0a804d38fa3fb?d=identicon)[jmalloc](/maintainers/jmalloc)

---

Top Contributors

[![jmalloc](https://avatars.githubusercontent.com/u/761536?v=4)](https://github.com/jmalloc "jmalloc (30 commits)")

---

Tags

filedirectorydirfoldertemptmp

### Embed Badge

![Health badge](/badges/icecave-temptation/health.svg)

```
[![Health](https://phpackages.com/badges/icecave-temptation/health.svg)](https://phpackages.com/packages/icecave-temptation)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[adlawson/vfs

Virtual file system

300440.8k22](/packages/adlawson-vfs)[makasim/temp-file

Temp file object

293.8M7](/packages/makasim-temp-file)[denisyukphp/tmpfile

Alternative to tmpfile() function.

224.6k1](/packages/denisyukphp-tmpfile)[crysalead/dir

Recursive directory scanner to locate directories and/or files in a file system

16221.5k4](/packages/crysalead-dir)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
