Symfony\Component\Process\Process::run
Runs the process.
The callback receives the type of output (out or err) and some bytes from the output in real-time. It allows to have feedback from the independent process during execution. The STDOUT and STDERR are also available after the process is finished via the getOutput() and getErrorOutput() methods.
Signature
public function run([callback|null
$callback = null] )
Parameters
$callback
— object- A PHP callback to run whenever there is some
output available on STDOUT or STDERR
Returns
- integer
- The exit status code
Errors/Exceptions
-
RuntimeException
- When process can't be launch or is stopped