PHPackages                             n-coded/php-safe-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. n-coded/php-safe-exec

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

n-coded/php-safe-exec
=====================

Run system command safely

v0.1.0(10y ago)210.2k↓50%1PHP

Since Sep 28Pushed 10y ago1 watchersCompare

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

READMEChangelog (1)DependenciesVersions (2)Used By (0)

PHP-safe-exec
=============

[](#php-safe-exec)

Generate and run shell command safely by escaping option value and argument

### Usage:

[](#usage)

```
$command = new SafeExec('unoconv');
$command->addOption('-f', 'pdf');
$command->addOption('-o', 'test.pdf');
$command->addArgument('test.docx');
$command->stdoutToNull();
$command->shell_exec();

```

or use chaining:

```
$command = (new SafeExec('unoconv'))->addOption('-f', 'pdf')->addOption('-o', 'test.pdf')->addArgument('test.docx')->stderrToStdout();
$command->exec($output, $return_var);

```

#### Donation

[](#donation)

Thank you for using and donation

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

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

Unknown

Total

1

Last Release

3885d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/14861295?v=4)[n-coded](/maintainers/n-coded)[@n-coded](https://github.com/n-coded)

---

Top Contributors

[![n-coded](https://avatars.githubusercontent.com/u/14861295?v=4)](https://github.com/n-coded "n-coded (2 commits)")

### Embed Badge

![Health badge](/badges/n-coded-php-safe-exec/health.svg)

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

###  Alternatives

[spatie/macroable

A trait to dynamically add methods to a class

72759.6M64](/packages/spatie-macroable)[google/longrunning

Google LongRunning Client for PHP

5771.7M4](/packages/google-longrunning)[consolidation/filter-via-dot-access-data

This project uses dflydev/dot-access-data to provide simple output filtering for applications built with annotated-command / Robo.

4646.9M13](/packages/consolidation-filter-via-dot-access-data)[phootwork/lang

Missing PHP language constructs

1224.8M8](/packages/phootwork-lang)

PHPackages © 2026

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