PHPackages                             thesebas/promise-async-await - 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. thesebas/promise-async-await

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

thesebas/promise-async-await
============================

async-await emulation on generator+yield

1.0.1(6y ago)69[1 PRs](https://github.com/thesebas/php-promise-async-await/pulls)MITPHP

Since Jan 31Pushed 5y ago1 watchersCompare

[ Source](https://github.com/thesebas/php-promise-async-await)[ Packagist](https://packagist.org/packages/thesebas/promise-async-await)[ RSS](/packages/thesebas-promise-async-await/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (2)Versions (5)Used By (0)

php-promise-async-await
=======================

[](#php-promise-async-await)

ReactPHP async-await emulator with generator and yield

Instalation
-----------

[](#instalation)

```
composer require thesebas/promise-async-await

```

Usage
-----

[](#usage)

It makes possible writing

```
asyncRun(function ($init) {
    $res = yield asyncFunc($init);
    $res2 = yield all([asyncFunc($res + 1), asyncFunc($res + 1)]);
    $res3 = yield race([asyncFunc($res * 2), asyncFunc($res2 / 2)]);
    return "wow" . $init . $res . $res2 . $res3;
}, 0.1)->then(function ($result) {
    // ... $result is eq "wow".$init.$res.$res2.$res3;
});
```

instead of

```
$init = 0.1;
asyncFunc($init)->then(function ($res) {
    return all([asyncFunc($res + 1), asyncFunc($res + 1)]);
})->then(function ($res2) {
    return yield race([asyncFunc(/* $res? */), asyncFunc($res2 / 2)]);
})->then(function ($res3) {
    return "wow" ./* $init? */ /* $res?*/ /* $res2?*/ $res3
})->then(function ($result) {
    // ... $result is eq "wow".$res3;
});
```

For more see `spec`

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

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

Total

2

Last Release

2291d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

asyncawaitgeneratorphppromisereactphpyield

### Embed Badge

![Health badge](/badges/thesebas-promise-async-await/health.svg)

```
[![Health](https://phpackages.com/badges/thesebas-promise-async-await/health.svg)](https://phpackages.com/packages/thesebas-promise-async-await)
```

###  Alternatives

[composer/composer

Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.

29.4k187.2M2.6k](/packages/composer-composer)[react/react

ReactPHP: Event-driven, non-blocking I/O with PHP.

9.1k3.6M63](/packages/react-react)[reactivex/rxphp

Reactive extensions for php.

1.7k3.2M49](/packages/reactivex-rxphp)[internal/dload

Downloads binaries.

98142.7k10](/packages/internal-dload)[wyrihaximus/react-child-process-messenger

Messenger decorator for react/child-process

32279.4k4](/packages/wyrihaximus-react-child-process-messenger)[wyrihaximus/react-cron

⏱️ Cronlike scheduler running inside the ReactPHP Event Loop

4050.6k](/packages/wyrihaximus-react-cron)

PHPackages © 2026

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