PHPackages                             ajthenewguy/php7-machines - 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. ajthenewguy/php7-machines

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

ajthenewguy/php7-machines
=========================

Implementation of a finite state machine in PHP7

v0.0.2(5y ago)00MITPHPPHP ^7.2.5CI failing

Since Jun 6Pushed 4y ago1 watchersCompare

[ Source](https://github.com/fissible/php7-machines)[ Packagist](https://packagist.org/packages/ajthenewguy/php7-machines)[ RSS](/packages/ajthenewguy-php7-machines/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (4)Versions (3)Used By (0)

php7-machines
=============

[](#php7-machines)

Implementation of a finite state machine in PHP7.

Usage
-----

[](#usage)

A turnstile abstraction:

```
use Machines\State;
use Machines\StateMachine;
use Machines\Transition;

$Locked = new State('Locked');
$Unlocked = new State('Unlocked');

$Locked->setTransitions([
    new Transition(new MatchAcceptor('coin'), $Unlocked)
]);
$Unlocked->setTransitions([
    new Transition(new MatchAcceptor('push'), $Locked)
]);

$machine = new StateMachine([$Locked, $Unlocked]);

$machine->input('coin');

$machine->input('push');

```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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 ~0 days

Total

2

Last Release

2164d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ef298fbffac2225e36ab3a6e089af020f76885bc65d5f6afda831c64939e1e4b?d=identicon)[fissible](/maintainers/fissible)

---

Top Contributors

[![fissible](https://avatars.githubusercontent.com/u/1410914?v=4)](https://github.com/fissible "fissible (9 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ajthenewguy-php7-machines/health.svg)

```
[![Health](https://phpackages.com/badges/ajthenewguy-php7-machines/health.svg)](https://phpackages.com/packages/ajthenewguy-php7-machines)
```

###  Alternatives

[malios/php-to-ascii-table

A PHP library to generate plain text tables.

30118.8k1](/packages/malios-php-to-ascii-table)[samsara/fermat

A library providing math and statistics operations for numbers of arbitrary size.

653.1k3](/packages/samsara-fermat)[shrink0r/workflux

Finite state machine for php.

375.6k1](/packages/shrink0r-workflux)

PHPackages © 2026

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