PHPackages                             php-strict/script-runner - 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. [CLI &amp; Console](/categories/cli)
4. /
5. php-strict/script-runner

ActiveLibrary[CLI &amp; Console](/categories/cli)

php-strict/script-runner
========================

Class for running PHP CLI script in several separate processes.

351PHP

Since Jun 3Pushed 1y ago1 watchersCompare

[ Source](https://github.com/php-strict/script-runner)[ Packagist](https://packagist.org/packages/php-strict/script-runner)[ RSS](/packages/php-strict-script-runner/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Script runner
=============

[](#script-runner)

[![Software License](https://camo.githubusercontent.com/e1514dd3f2095dbf68a0008ae62a631142953ad2e86aa94c504343f2c2c191da/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d47504c2d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.txt)[![Build Status](https://camo.githubusercontent.com/79314ac0ec4ea0026563394b8e82f901dffb5a634afcfa2122f6f59762116578/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7068702d7374726963742f7363726970742d72756e6e65722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/php-strict/script-runner)[![codecov](https://camo.githubusercontent.com/20fe01103ce0f1ea5a0863e039a5d2b69d61729104a931b9c651b6028baeb224/68747470733a2f2f636f6465636f762e696f2f67682f7068702d7374726963742f7363726970742d72756e6e65722f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/php-strict/script-runner)[![Codacy Badge](https://camo.githubusercontent.com/896091586fdab1f118093294493f9c2ce8489a9dcdd092aa3d0651cb56225c68/68747470733a2f2f6170702e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3763373865326435396663653436653738666236353136306463353330626433)](https://www.codacy.com/gh/php-strict/script-runner?utm_source=github.com&utm_medium=referral&utm_content=php-strict/script-runner&utm_campaign=Badge_Grade)

Class for running PHP CLI script in several separate processes.

Requirements
------------

[](#requirements)

- PHP &gt;= 7.1

Install
-------

[](#install)

Use class as standalone:

```
require 'ScriptRunner.php';
use PhpStrict\ScriptRunner\ScriptRunner;
```

Install with [Composer](http://getcomposer.org):

```
composer require php-strict/script-runner
```

Usage
-----

[](#usage)

```
use PhpStrict\ScriptRunner\ScriptRunner;

//params: path_to_script, processes count (if omitted then system CPU cores count will be used)
$sr = new ScriptRunner('script.php', 4);
$sr->run();
```

May be used with [CooperativeWorker](https://github.com/php-strict/cooperative-worker)to split one sequential process into several separated processes and keep them from collisions and making the same job twice. For eaxample it is possible to convert process of parsing log files from cycle (where log files parsing one-by-one) into several separated processes where each process take job from common temporary storage (queue).

Tests
-----

[](#tests)

To execute the test suite, you'll need [Codeception](https://codeception.com/).

```
vendor/bin/codecept run
```

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance26

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity18

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/9f404fa292f952ba0429cfe11f608e982e0d9d645f2ac864c53abee7f71dff2b?d=identicon)[enikeishik](/maintainers/enikeishik)

---

Top Contributors

[![enikeishik](https://avatars.githubusercontent.com/u/2239913?v=4)](https://github.com/enikeishik "enikeishik (18 commits)")

---

Tags

multiprocessingphpphp-libraryphp7runnerscript

### Embed Badge

![Health badge](/badges/php-strict-script-runner/health.svg)

```
[![Health](https://phpackages.com/badges/php-strict-script-runner/health.svg)](https://phpackages.com/packages/php-strict-script-runner)
```

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

5.1k17.2M320](/packages/wp-cli-wp-cli)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M19](/packages/consolidation-annotated-command)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)[codedungeon/php-cli-colors

Liven up you PHP Console Apps with standard colors

10210.1M26](/packages/codedungeon-php-cli-colors)

PHPackages © 2026

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