slava-vishnyakov/proc-runner

There is no license information available for the latest version (0.2.2) of this package.

Process runner

Installs: 15

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/slava-vishnyakov/proc-runner

0.2.2 2015-07-11 09:19 UTC

This package is auto-updated.

Last update: 2025-09-21 22:33:14 UTC


README

This is very alpha quality.

$r = new ProcRunner\LocalRunner('redis-cli');

try {
    $r->send("GET test\n");
    print "Got line: " . $r->readLine() . "\n";
    $r->send("SET test 1\nGet test\n");
    print "Got line: " . $r->readLine() . "\n";
    print "Got line: " . $r->readLine() . "\n";
    print "Got line: " . $r->readLineIfAny() . "\n";

    $r->send("fds\n");
    print "Got stderr line: " . $r->readStderrLineIfAny() . "\n";
    $code = $r->close();
} catch (Exception $e) {
}

print "Got return value: " . $r->getReturnValue() . $r->readStderrLineIfAny() . "\n";