PHPackages                             tandefal/php-async - 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. tandefal/php-async

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

tandefal/php-async
==================

00PHP

Since May 21Pushed 1y ago1 watchersCompare

[ Source](https://github.com/tandefal/php-async)[ Packagist](https://packagist.org/packages/tandefal/php-async)[ RSS](/packages/tandefal-php-async/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

PHP-ASYNC
=========

[](#php-async)

---

Что это?
========

[](#что-это)

Функции-помощники для работы с циклом событий ReactPHP, популярной PHP платформой с событийно-ориентированным, неблокирующим вводом-выводом. Эти таймеры имеют вид javascript setInterval,setTimeout и Promise.

Установка
=========

[](#установка)

Убедитесь, что у вас установлен Composer

```
composer require tandefal/php-async
```

После установки включите автозагрузчик Composer в свой код:

```
require 'vendor/autoload.php';
```

Применение
==========

[](#применение)

- interval указываем в ms
- setInterval( callable $callback, int $interval ): React\\EventLoop\\TimerInterface;

```
$count = 1;
setInterval(function () use(&$count) {
    echo "Count: {$count}\n";
    $count++;
}, 1000);
```

- interval указываем в ms
- setTimeout(callable $callback, int $interval): React\\EventLoop\\TimerInterface;

```
setTimeout(function () {
    echo "Hello World\n";
}, 1000);
```

- clearTimeout(React\\EventLoop\\TimerInterface $timer): void;

```
$timeout = setTimeout(function(){
    //The following code will not run
    echo "Hello Planet\n";
}, 1000);
clearTimeout($timeout);
```

- clearInterval(React\\EventLoop\\TimerInterface $timer): void;

```
setInterval(function($timer){
    clearInterval($timer);
    //The following code will only run once
    echo "Hello World\n";
}, 1000);
```

[Examples](https://github.com/tandefal/php-async/tree/main/example)
===================================================================

[](#examples)

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance26

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity18

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/929eba20959c0c3f965d57662a834b39b6633a7af14eb4ffb2ab0f40ff387849?d=identicon)[tandefal](/maintainers/tandefal)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/tandefal-php-async/health.svg)

```
[![Health](https://phpackages.com/badges/tandefal-php-async/health.svg)](https://phpackages.com/packages/tandefal-php-async)
```

###  Alternatives

[5ini99/think-addons

addons package for thinkphp5

1453.2k](/packages/5ini99-think-addons)[metrakit/faker-eddy-malou

Use Eddy Malou sentences for your dummy texts

172.7k](/packages/metrakit-faker-eddy-malou)

PHPackages © 2026

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