Exceptions

at line 226

This method blocks until all STDIN data is sent to the process then it
returns while the process runs in the background.

The termination of the process can be awaited with wait().

The callback receives the type of output (out or err) and some bytes from
the output in real-time while writing the standard input to the process.
It allows to have feedback from the independent process during execution.
If there is no callback passed, the wait() method can be called
with true as a second parameter then the callback will get all data occurred
in (and since) the start call.

Parameters

callable|null

$callback

A PHP callback to run whenever there is some output available on STDOUT or STDERR

Return Value

Exceptions

See also

start()

at line 307

public integer
wait(callable|null $callback = null)

Waits for the process to terminate.

The callback receives the type of output (out or err) and some bytes
from the output in real-time while writing the standard input to the process.
It allows to have feedback from the independent process during execution.