PHPackages                             merterciyescagan/thanos - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. merterciyescagan/thanos

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

merterciyescagan/thanos
=======================

Thanos is a PHP-based library designed to emulate the power of the Infinity Gauntlet. It allows users to manipulate data using the six Infinity Stones: Mind, Power, Reality, Soul, Space, and Time. Each stone has unique abilities that alter the given data.

v1.5(1y ago)03[1 issues](https://github.com/erciyescagan/thanos/issues)MITPHP

Since Mar 26Pushed 1y ago1 watchersCompare

[ Source](https://github.com/erciyescagan/thanos)[ Packagist](https://packagist.org/packages/merterciyescagan/thanos)[ RSS](/packages/merterciyescagan-thanos/feed)WikiDiscussions main Synced today

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Thanos PHP Library
==================

[](#thanos-php-library)

Thanos is a PHP-based library designed to emulate the power of the Infinity Gauntlet. It allows users to manipulate data using the six Infinity Stones: Mind, Power, Reality, Soul, Space, and Time. Each stone has unique abilities that alter the given data.

Features
--------

[](#features)

- **Mind Stone**: Reverses text.
- **Power Stone**: Replaces random letters in text with '\*'.
- **Reality Stone**: Shuffles characters in text.
- **Soul Stone**: Repeats text one time with dividers.
- **Space Stone**: Adds 2 spaces between characters.
- **Time Stone**: Modifies a date based on the input.
- **Infinity Gauntlet**: Uses all six stones to remove half of the data.

Installation
------------

[](#installation)

```
composer require merterciyescagan/thanos
```

Usage
-----

[](#usage)

### Using Individual Stones

[](#using-individual-stones)

#### Mind Stone

[](#mind-stone)

```
$mindStone = new Stone(new Mind());
$mindStone = $mindStone->set("Hello World");
echo $mindStone->use()->getResult(); // Output: "dlroW olleH";
echo $mindStone->use(2)->getResult(); // Output: "Hello World"
echo $mindStone->use(2)->use()->getResult(); // Output: "dlroW olleH"
```

#### Power Stone

[](#power-stone)

```
$powerStone = new Stone(new Power());
$powerStone = $powerStone->set("Hello World");
echo $powerStone->use()->getResult(); // Output: "Hello Wo*ld"
echo $powerStone->use(2)->getResult(); // Output: "Hell* Wo*ld"
echo $powerStone->use(2)->use()->getResult(); //Output: "He*ll* Wo*ld"
```

#### Reality Stone

[](#reality-stone)

```
$realityStone = new Stone(new Reality());
$realityStone = $realityStone->set("Hello World");
echo $realityStone->use()->getResult(); // Output: Randomly shuffled text
echo $realityStone->use(2)->getResult(); // Output: 2 times randomly shuffled text
echo $realityStone->use(2)->use()->getResult(); // Output: 3 times randomly shuffled text
```

#### Soul Stone

[](#soul-stone)

```
$soulStone = new Stone(new Soul());
$soulStone = $soulStone->set("Hello World");
echo $soulStone->use()->getResult(); // Output: "Hello World | Hello World"
echo $soulStone->use(2)->getResult(); // Output "Hello World | Hello World | Hello World | Hello World"
echo $soulStone->use(2)->use()->getResult(); // Output "Hello World | Hello World | Hello World | Hello World | Hello World | Hello World | Hello World | Hello World"
```

#### Space Stone

[](#space-stone)

```
$spaceStone = new Stone(new Space());
$spaceStone = $spaceStone->set("Hello World");
echo $spaceStone->use()->getResult(); // Output: "H e l l o   W o r l d"
echo $spaceStone->use(2)->getResult(); // Output: ""H        e        l        l        o                 W        o        r        l        d""
echo $spaceStone->use(2)->use()->getResult(); // Output: "H                          e                          l                          l                          o                                                     W                          o                          r                          l                          d"
```

#### Time Stone

[](#time-stone)

```
$timeStone = new Stone(new Time());
$timeStone = $timeStone->set(+1);
echo $timeStone->use()->getResult(); // Output: +1 day based on today
echo $timeStone->use(2)->getResult(); // Output: +2 day based on today
echo $timeStone->use(2)->use()->getResult(); // Output: +3 day based on today
```

### Using the Gauntlet

[](#using-the-gauntlet)

```
$mindStone = new Stone(new Mind());
$powerStone = new Stone(new Power());
$realityStone = new Stone(new Reality());
$soulStone = new Stone(new Soul());
$spaceStone = new Stone(new Space());
$timeStone = new Stone(new Time());

$gauntlet = new Gauntlet();

$gauntlet->setGauntlet(
    new InfinityGauntlet(),
    [$mindStone, $powerStone, $realityStone, $soulStone, $spaceStone, $timeStone]
);
$result = $gauntlet->snap(['Iron Man', 'Thor', 'Hulk', 'Black Widow']);
print_r($result); // Random half removed
```

Requirements
------------

[](#requirements)

- PHP 8.0+
- Composer

Contributing
------------

[](#contributing)

Feel free to fork and submit pull requests. Bug reports and feature requests are welcome!

License
-------

[](#license)

MIT

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance42

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

464d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/22736420?v=4)[erciyescagan](/maintainers/erciyescagan)[@erciyescagan](https://github.com/erciyescagan)

---

Top Contributors

[![erciyescagan](https://avatars.githubusercontent.com/u/22736420?v=4)](https://github.com/erciyescagan "erciyescagan (10 commits)")

### Embed Badge

![Health badge](/badges/merterciyescagan-thanos/health.svg)

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

###  Alternatives

[silverstripe/comments

Provides commenting functionality for your SilverStripe site.

40258.5k14](/packages/silverstripe-comments)

PHPackages © 2026

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