function execx($cmd, ...)libphutil Technical Documentation (Futures)
function execx($cmd, ...)
libphutil Technical Documentation (Futures)
Execute a command and capture stdout and stderr. If the command exits with a nonzero error code, a CommandException will be thrown. If you need to manually handle error conditions, use exec_manual().
list ($stdout, $stderr) = execx('ls %s', $file);
Parameters
string | $cmd | sprintf()-style command pattern to execute. |
... | Arguments to sprintf pattern. |
Return
array | List of stdout and stderr. |
- Defined
- src/future/exec/execx.php:14