PHPackages                             i07/php-simple-threads - 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. i07/php-simple-threads

ActiveLibrary

i07/php-simple-threads
======================

A very simplistic approach on parallel processing with PHP

0.1.0(8y ago)012MITPHPPHP &gt;=7.0

Since Mar 5Pushed 8y ago1 watchersCompare

[ Source](https://github.com/i07/PHPSimpleThreads)[ Packagist](https://packagist.org/packages/i07/php-simple-threads)[ RSS](/packages/i07-php-simple-threads/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (2)Versions (3)Used By (0)

PHPSimpleThreads
================

[](#phpsimplethreads)

[![Total Downloads](https://camo.githubusercontent.com/01aabb88b9510aa86b58bb48e249d237b5693a8e7ccfd7d1b8493e2c24e1fd29/68747470733a2f2f706f7365722e707567782e6f72672f6930372f7068702d73696d706c652d746872656164732f646f776e6c6f616473)](https://packagist.org/packages/i07/php-simple-threads)[![Minimum PHP Version](https://camo.githubusercontent.com/5c3072425e67297c8ef63d17acd2c86a0d2ef324f19249f2280bd7de902f63a2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230372e302d3838393242462e737667)](https://secure.php.net/)[![Latest Stable Version](https://camo.githubusercontent.com/f0467641c3463b988dbb6058866d7a5c613287ac3f6bf9ec74b21ddfa792cc2d/68747470733a2f2f706f7365722e707567782e6f72672f6930372f7068702d73696d706c652d746872656164732f762f737461626c65)](https://packagist.org/packages/i07/php-simple-threads)[![License](https://camo.githubusercontent.com/95148b4f5ca8dee9485b8e05df70ddcbe8b4cf4db26fbddc933a93c3c658108b/68747470733a2f2f706f7365722e707567782e6f72672f6930372f7068702d73696d706c652d746872656164732f6c6963656e7365)](https://packagist.org/packages/i07/php-simple-threads)

A simplistic approach on parallel processing with PHP.

PHPSimpleThreads offers a simple way of starting and handling multiple php-cli processes within your PHP application.

Installation
------------

[](#installation)

Installation via composer:

```
composer install i07/php-simple-threads

```

Usage
-----

[](#usage)

PHPSimpleThreads will execute 'workers' from the workers folder in your project root folder. A basic worker should have the following structure.

```
include(__DIR__."/../vendor/autoload.php");

class myWorker extends \SimpleThreads\Factory\WorkerFactory {

    public function doWork($arguments) {

        //do some work here and return the result of the task
        $mywork = $this->myWorkFunction($arguments);
        return $mywork;

    }

    private function myWorkFunction($arguments) {

        //do stuff based on the $arguments

        return $result;

    }

}

new myWorker($myDescription);
```

save the file as myWorker.php in the workers directory.

Example on how to start the workers:

index.php

```
include("vendor/autoload.php");

$my_workers = [
    [
        "id" => "Worker1",
        "command" => "myWorker",
        "payload" => "argument-string"
    ],
    [
        "id" => "Worker2",
        "command" => "myWorker",
        "payload" => [
            "option1" => "value1",
            "argument" => "array"
        ]
    ]
];

$myPool = new \SimpleThreads\Pool($my_workers);
$myPool->run();

// SimpleThreads will hold an object with all workers results, the get the results of all workers:
$results = $myPool->getOutput();

var_dump($results);
```

$results will be an array of objects with all data needed to process the response from each worker.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

2993d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/38bd82877118287b4e342110335c96a6a85b53a992c28d2ae7e1958e1eb19a06?d=identicon)[i07](/maintainers/i07)

---

Tags

composerforkphp-cliphp-libraryphp7thread-poolthreading

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/i07-php-simple-threads/health.svg)

```
[![Health](https://phpackages.com/badges/i07-php-simple-threads/health.svg)](https://phpackages.com/packages/i07-php-simple-threads)
```

PHPackages © 2026

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