5797059008eb5562eb59ba7d317f63b573503170
This commit changes the api of the stream classes, since indication of success or failure is no longer necessary.
NIH PHP Command Builder
Simple command builder inspired by rust's std library.
<?php
use Nih\CommandBuilder\Command;
use Nih\CommandBuilder\Stdio;
require_once __DIR__ . '/vendor/autoload.php';
$child = (new Command('cat'))
->stdin(Stdio::piped())
->stdout(Stdio::piped())
->spawn();
$child->stdin?->write('Hello, this is pretty cool.');
$output = $child->output();
echo $output->stdout;
// Hello, this is pretty cool.
Languages
PHP
99.2%
Makefile
0.8%