Quittio next API

Process
in package

FinalYes

Minimal external process runner with stdin, timeout and captured output.

Table of Contents

Methods

open()  : resource
proc_open() that reports a program that cannot be started (e.g. java, verapdf or docker not installed) as RuntimeException, also where PHP warnings become exceptions (Laravel), so that validators can report themselves as unavailable.
run()  : array{exitCode: int, stdout: string, stderr: string}

Methods

open()

proc_open() that reports a program that cannot be started (e.g. java, verapdf or docker not installed) as RuntimeException, also where PHP warnings become exceptions (Laravel), so that validators can report themselves as unavailable.

public static open(array<int, string> $command, array<int, array<int, string>> $descriptors, array<int, resource>|null &$pipes) : resource
Parameters
$command : array<int, string>
$descriptors : array<int, array<int, string>>
$pipes : array<int, resource>|null
Tags
param-out

array<int, resource> $pipes

Return values
resource

run()

public static run(array<int, string> $command[, string|null $input = null ][, int $timeout = 60 ]) : array{exitCode: int, stdout: string, stderr: string}
Parameters
$command : array<int, string>
$input : string|null = null
$timeout : int = 60
Return values
array{exitCode: int, stdout: string, stderr: string}
On this page

Search results