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 2y 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 3w 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

14

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity19

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

[illuminate/console

The Illuminate Console package.

13046.0M6.5k](/packages/illuminate-console)[styleci/cli

The CLI tool for StyleCI

71470.5k9](/packages/styleci-cli)[winbox/args

Windows command-line formatter

20720.9k21](/packages/winbox-args)[tomatophp/filament-artisan

Simple but yet powerful library for running some artisan commands for FilamentPHP

3275.4k1](/packages/tomatophp-filament-artisan)[thettler/laravel-console-toolkit

This Package provides some usefully console features like the attribute syntax for arguments and options, validation, auto ask and casting.

324.1k](/packages/thettler-laravel-console-toolkit)

PHPackages © 2026

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