PHPackages                             tomaszdurka/php-exec - 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. tomaszdurka/php-exec

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

tomaszdurka/php-exec
====================

0.1.1(11y ago)44801[1 issues](https://github.com/tomaszdurka/php-exec/issues)PHP

Since Sep 10Pushed 11y agoCompare

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

READMEChangelogDependencies (3)Versions (3)Used By (0)

### PhpExec

[](#phpexec)

Super-simple library for executing shell commands in php. I have created it without knowledge of already mature (fulfiling my needs) library

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

[](#installation)

Use composer:

```
{
  "require": {
    "tomaszdurka/php-exec": "~0.1.0"
  }
}
```

Code usage
----------

[](#code-usage)

```
$command = new Command('ls');
$result = $command->run();

$result->isSuccess();
$result->getOutput();
$result->getExitCode();
$result->getErrorOutput();
```

Events
------

[](#events)

Apart from basic usage you can listen to intercept specific Command events. All possible events are listed in example below:

```
$command = new Command('ls');
$command->on('start', function($pid) {
});
$command->on('stdout', function($output) {
});
$command->on('stderr', function($error) {
});
$command->on('stop', function($exitCode) {
});
$command->run();
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

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

Total

2

Last Release

4262d ago

### Community

Maintainers

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

---

Top Contributors

[![tomaszdurka](https://avatars.githubusercontent.com/u/113303?v=4)](https://github.com/tomaszdurka "tomaszdurka (9 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tomaszdurka-php-exec/health.svg)

```
[![Health](https://phpackages.com/badges/tomaszdurka-php-exec/health.svg)](https://phpackages.com/packages/tomaszdurka-php-exec)
```

###  Alternatives

[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)[alchemy/binary-driver

A set of tools to build binary drivers

19110.9M39](/packages/alchemy-binary-driver)[react/zmq

ZeroMQ bindings for React.

2471.7M31](/packages/react-zmq)[mkraemer/react-pcntl

PCNTL bindings for ReactPHP

57289.0k9](/packages/mkraemer-react-pcntl)[wyrihaximus/react-child-process-pool

Pool wyrihaximus/react-child-process-messenger processes

40244.4k5](/packages/wyrihaximus-react-child-process-pool)

PHPackages © 2026

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