Opens a pipe to a process executed by running
command on the shell, with a variety of
options. The descriptors parameter must be an array with three
elements—in order, they describe the
stderr descriptors. For each, specify either
an array containing two elements or a stream resource. In the first
case, if the first element is
"pipe", the second element is either
"r" to read from the pipe or
"w" to write to the pipe. If the
"file", the second must be
a filename. The
pipes array is filled with
an array of file pointers corresponding to the processes’ descriptors.
dir is specified, the process has its
current working directory set to that path. If
env is specified, the process has its
environment set up with the values from that array. Finally,
options contains an associative array with
additional options. The following options can be set in the
If set and true, suppresses errors generated by the process (Windows only).
If set and true, bypasses cmd.exe when running the process.
If set, specifies the stream context when opening files.
If any error occurs while attempting to open the process,
false is returned. If not, the
resource handle for the process is returned.