PHPackages                             lisao/process - 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. [Queues &amp; Workers](/categories/queues)
4. /
5. lisao/process

ActiveLibrary[Queues &amp; Workers](/categories/queues)

lisao/process
=============

PHP 守护进程多进程运行扩展库

1.2(7y ago)4231MITPHPPHP &gt;=5.6

Since Jun 16Pushed 7y ago1 watchersCompare

[ Source](https://github.com/yuanxin32323/process)[ Packagist](https://packagist.org/packages/lisao/process)[ RSS](/packages/lisao-process/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (3)DependenciesVersions (4)Used By (0)

What's This?
============

[](#whats-this)

这是一个为方便初级 phper 使用 php 进行多进程开发的库。
用不到十行的代码，实现一个以守护进程方式启动的多进程程序。

一般用于消息队列的消费者端、多进程爬虫等场景

### 初始化运行库

[](#初始化运行库)

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

$app = new \Lisao\Process\Process([
    'process_count' => 4 , //运行的线程数
    'process_save' => './process.pid' //线程 id 保存路径，用于停止进程时使用
]);
```

### 闭包运行

[](#闭包运行)

```
/*
 * $work_id 为工作id，从0开始，根据线程数顺序递增。
 * 用于区分进程，指派任务
 */
$app->start(function($work_id){
    echo "我启动了，工作ID：{$work_id} \n";
});
```

### 类方法运行

[](#类方法运行)

```
class obj {
    public function test($work_id) {
        echo "我启动了，工作ID：{$work_id} \n";
    }
}

$obj = new obj();
$app->start($obj, 'test');
```

### 停止运行

[](#停止运行)

```
$app->stop();
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

2890d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/caed1d865f595683ce47966eb1500a61ff6ec96f542fa02e4b3d223def349a07?d=identicon)[yuanxin32323](/maintainers/yuanxin32323)

---

Top Contributors

[![yuanxin32323](https://avatars.githubusercontent.com/u/17340200?v=4)](https://github.com/yuanxin32323 "yuanxin32323 (3 commits)")

---

Tags

queue

### Embed Badge

![Health badge](/badges/lisao-process/health.svg)

```
[![Health](https://phpackages.com/badges/lisao-process/health.svg)](https://phpackages.com/packages/lisao-process)
```

###  Alternatives

[php-amqplib/php-amqplib

Formerly videlalvaro/php-amqplib. This library is a pure PHP implementation of the AMQP protocol. It's been tested against RabbitMQ.

4.6k125.3M879](/packages/php-amqplib-php-amqplib)[ramsey/collection

A PHP library for representing and manipulating collections.

1.2k486.0M69](/packages/ramsey-collection)[queue-interop/queue-interop

Promoting the interoperability of MQs objects. Based on Java JMS

48030.5M87](/packages/queue-interop-queue-interop)[enqueue/enqueue

Message Queue Library

19820.0M56](/packages/enqueue-enqueue)[enqueue/amqp-tools

Message Queue Amqp Tools

14721.1M12](/packages/enqueue-amqp-tools)[phootwork/collection

The phootwork library fills gaps in the php language and provides better solutions than the existing ones php offers.

3924.8M15](/packages/phootwork-collection)

PHPackages © 2026

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