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-11-04 19:04:31 UTC


README

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.