PHPackages                             christiaan/stream-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. christiaan/stream-process

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

christiaan/stream-process
=========================

Wrapper around proc\_open to ease communication via streams between processes

1.0.2(7y ago)412.4k↓40%1MITPHPPHP &gt;= 5.3.2

Since Mar 7Pushed 7y ago1 watchersCompare

[ Source](https://github.com/christiaan/stream-process)[ Packagist](https://packagist.org/packages/christiaan/stream-process)[ RSS](/packages/christiaan-stream-process/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (4)Used By (1)

StreamProcess
=============

[](#streamprocess)

[![Build Status](https://camo.githubusercontent.com/065f71012f3b19619a637e991e3612671461d45274c284de34f600813171c278/68747470733a2f2f7472617669732d63692e6f72672f6368726973746961616e2f73747265616d2d70726f636573732e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/christiaan/stream-process)

Easily spawn processes and communicate with them using streams. Mainly build to be used together with [react/event-loop](https://packagist.org/packages/react/event-loop).

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

[](#installation)

```
composer.phar require christiaan/stream-process
```

Usage
-----

[](#usage)

```
$loop = \React\EventLoop\Factory::create();

$child = new StreamProcess('php someWorkerProcess.php');

$loop->addReadStream($child->getReadStream(), function($stream) {
        $data = fgets($stream);
        fwrite(STDOUT, $data);
    });

$loop->addPeriodicTimer(1, function() {
        pcntl_signal_dispatch();
    });

pcntl_signal(SIGTERM, function() use($loop) {
        $loop->stop();
        // Cleanup before closing
        exit(0);
    });

fwrite($child->getWriteStream(), 'start');
$loop->run();
```

Known issues
------------

[](#known-issues)

Not working on Windows because of this [bug](https://bugs.php.net/bug.php?id=47918)

Could possible be fixed by using files instead of direct streams.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community9

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

Total

3

Last Release

2872d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8571758471c73669aeb7e688a77b6cf5de0c6b2a99bb7ee12888d4b793bfd27f?d=identicon)[christiaan](/maintainers/christiaan)

---

Top Contributors

[![christiaan](https://avatars.githubusercontent.com/u/118490?v=4)](https://github.com/christiaan "christiaan (7 commits)")

---

Tags

streamevent-loopprocessreactproc\_open

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[react/event-loop

ReactPHP's core reactor event loop that libraries can use for evented I/O.

1.3k139.6M664](/packages/react-event-loop)[react/stream

Event-driven readable and writable streams for non-blocking I/O in ReactPHP

689126.8M194](/packages/react-stream)[react/child-process

Event-driven library for executing child processes with ReactPHP.

34076.1M136](/packages/react-child-process)[cocur/background-process

Start processes in the background that continue running when the PHP process exists.

2971.9M12](/packages/cocur-background-process)[phpmentors/workflower

A BPMN 2.0 workflow engine for PHP

70652.9k4](/packages/phpmentors-workflower)[ijpatricio/mingle

Use Vue and React in Laravel Livewire Applications.

43445.4k2](/packages/ijpatricio-mingle)

PHPackages © 2026

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