2017 © Pedro Peláez
 

library php-proc

PHP proc_* library

image

lshepstone/php-proc

PHP proc_* library

  • Friday, January 25, 2013
  • by lshepstone
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3,094 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 9 % Grown

The README.md

PhpProc

Basic wrapper for the PHP proc_* functions (blocking, single-thread, limited Windows support)., (*1)

Build Status, (*2)

use \PhpProc\Process;

$process = new Process();
$result = $process
    ->setCommand("/usr/bin/php -r \"echo getenv('USER');\"");
    ->setWorkingDirectory(__DIR__);
    ->setEnvironmentVars(array(
        'PATH' => getenv('PATH'),
        'SHELL' => getenv('SHELL'),
        'USER' => 'developer'))
    ->execute();

echo 'Status: ' . $result->getStatus() . PHP_EOL;
if ($result->hasErrors()) {
    echo 'Errors: ' . $result->getStdErrContents();
} else {
    echo 'Output: ' . $result->getStdOutContents();
}
Status: 0
Output: developer

The Versions

25/01 2013

dev-master

9999999-dev https://github.com/lshepstone/php-proc

PHP proc_* library

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

php command cli process line