reich/async

Simple way to make async operations using PHP

v1.0 2018-03-24 23:36 UTC

This package is not auto-updated.

Last update: 2024-03-25 16:07:38 UTC


README

68747470733a2f2f73372e706f7374696d672e63632f6471306f6478616d6a2f7068702e706e67

AsyncPHP

A simple way to make async operations using PHP

Installation

in the terminal:

composer require reich/async

Usage

To create a new thread:

$thread = new \AsyncPHP\Thread(function);

To join the thread to the main context:

$thread->join();

To get the currently running threads:

echo \AsyncPHP\Thread::$count

Note

This can only be used from the command line atm.