PHPackages                             enzolarosa/php\_multithread - 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. enzolarosa/php\_multithread

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

enzolarosa/php\_multithread
===========================

PHP library to handle multi-threading

0.15(8y ago)0561PHPPHP &gt;=5.3.0

Since Jan 2Pushed 8y ago1 watchersCompare

[ Source](https://github.com/enzolarosa/PHP-Multithread)[ Packagist](https://packagist.org/packages/enzolarosa/php_multithread)[ RSS](/packages/enzolarosa-php-multithread/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)DependenciesVersions (7)Used By (0)

Authors &amp; contact
---------------------

[](#authors--contact)

enzolarosa -

Documentation and download
--------------------------

[](#documentation-and-download)

Latest version is available on github at : -

License
-------

[](#license)

This Code is released under the GNU LGPL

Please do not change the header of the file(s).

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See the GNU Lesser General Public License for more details.

Description
-----------

[](#description)

This library provides a lightweight / simple PHP Oriented Object classe to handle multi-threading. Check the sample folder for examples on how to use it. This library requires to have the pcntl () extension installed and it will only work with unix distributions.

Setup
-----

[](#setup)

You can use composer to use this library.

```
{
    "require": {
		"enzolarosa/php_multithread": "*"
    }
}

```

Usage
-----

[](#usage)

This client does not rely or depend on any framework and it should be fairly easy to integrate with your own code. You can use composer or your own custom autoloader.

The sample folder contains example on how to use this library.

Example
-------

[](#example)

### Multi-threading a simple task

[](#multi-threading-a-simple-task)

```
require(__DIR__ . '/../vendor/autoload.php');

$maxThreads = 5;
echo 'Example of the multi-thread manager with ' . $maxThreads . ' threads' . PHP_EOL . PHP_EOL;
$params = array();
$exampleTask = new Threading\Task\Example($params);
$multithreadManager = new Threading\Multiple();

$cpt = 0;
while (++$cpt start($exampleTask);
}

```

Will provide following output :

```
Example of the multi-thread manager with 5 threads

[Pid:23447] Task executed at 2015-04-03 14:49:18
[Pid:23448] Task executed at 2015-04-03 14:49:18
[Pid:23449] Task executed at 2015-04-03 14:49:18
[Pid:23450] Task executed at 2015-04-03 14:49:18
[Pid:23451] Task executed at 2015-04-03 14:49:18
[Pid:23452] Task executed at 2015-04-03 14:49:19
[Pid:23454] Task executed at 2015-04-03 14:49:19
[Pid:23453] Task executed at 2015-04-03 14:49:19
[Pid:23455] Task executed at 2015-04-03 14:49:19
[Pid:23456] Task executed at 2015-04-03 14:49:19
[Pid:23457] Task executed at 2015-04-03 14:49:20
[Pid:23458] Task executed at 2015-04-03 14:49:20
[Pid:23459] Task executed at 2015-04-03 14:49:20
[Pid:23460] Task executed at 2015-04-03 14:49:20
[Pid:23461] Task executed at 2015-04-03 14:49:20
[Pid:23463] Task executed at 2015-04-03 14:49:21
[Pid:23462] Task executed at 2015-04-03 14:49:21
[Pid:23464] Task executed at 2015-04-03 14:49:21
[Pid:23465] Task executed at 2015-04-03 14:49:21
[Pid:23466] Task executed at 2015-04-03 14:49:21
[Pid:23467] Task executed at 2015-04-03 14:49:22
[Pid:23468] Task executed at 2015-04-03 14:49:22
[Pid:23470] Task executed at 2015-04-03 14:49:22
[Pid:23469] Task executed at 2015-04-03 14:49:22
[Pid:23471] Task executed at 2015-04-03 14:49:22
[Pid:23472] Task executed at 2015-04-03 14:49:23
[Pid:23473] Task executed at 2015-04-03 14:49:23
[Pid:23474] Task executed at 2015-04-03 14:49:23
[Pid:23475] Task executed at 2015-04-03 14:49:23
[Pid:23476] Task executed at 2015-04-03 14:49:23

```

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~242 days

Total

6

Last Release

3221d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/630722?v=4)[Vincenzo La Rosa](/maintainers/enzolarosa)[@enzolarosa](https://github.com/enzolarosa)

---

Top Contributors

[![alfallouji](https://avatars.githubusercontent.com/u/80544?v=4)](https://github.com/alfallouji "alfallouji (5 commits)")[![vlarosappl](https://avatars.githubusercontent.com/u/155563453?v=4)](https://github.com/vlarosappl "vlarosappl (5 commits)")[![godfery](https://avatars.githubusercontent.com/u/4199197?v=4)](https://github.com/godfery "godfery (3 commits)")[![RobWiddick](https://avatars.githubusercontent.com/u/979864?v=4)](https://github.com/RobWiddick "RobWiddick (1 commits)")

### Embed Badge

![Health badge](/badges/enzolarosa-php-multithread/health.svg)

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

###  Alternatives

[spatie/laravel-google-calendar

Manage events on a Google Calendar

1.4k1.7M21](/packages/spatie-laravel-google-calendar)[captainhook/plugin-composer

Composer-Plugin handling your git-hooks

202.1M194](/packages/captainhook-plugin-composer)[mastergalen/adsense-ads

Display Adsense ads easily in Laravel.

1211.2k](/packages/mastergalen-adsense-ads)

PHPackages © 2026

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