https://github.com/mre/process
A lightweight PHP wrapper for interactive subprocesses
https://github.com/mre/process
commandline php pipe process subprocess wrapper
Last synced: 5 months ago
JSON representation
A lightweight PHP wrapper for interactive subprocesses
- Host: GitHub
- URL: https://github.com/mre/process
- Owner: mre
- License: mit
- Created: 2015-01-24T15:49:45.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2019-10-21T13:15:50.000Z (about 6 years ago)
- Last Synced: 2025-03-31T08:28:58.896Z (10 months ago)
- Topics: commandline, php, pipe, process, subprocess, wrapper
- Language: PHP
- Homepage:
- Size: 20.5 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Process
=======
A lightweight wrapper around PHP's subprocess handling.
Especially useful for interactive commands.
Example
-------
```PHP
require_once __DIR__.'/../vendor/autoload.php';
use \mre\Process;
$process = new Process('cat');
$process->send('hello');
$process->send('world');
foreach ($process->receive() as $s)
{
echo $s . PHP_EOL;
}
```
Alternatives
------------
Fabien Potencier's `Process` library is awesome for non-interactive processes,
although it has grown quite big.
Maintainers
-----------
This project was initially started by Christian Lück.
It has been deprecated some time ago but I thought it's useful
and picked up development again.