Connect pipes of processes in php
问题 I would like the output of one process created with proc_open to be piped to another one created with proc_open (in php). For example. In bash I can do: [herbert@thdev1 ~]$ cat foo 2 3 1 [herbert@thdev1 ~]$ cat foo | sort 1 2 3 [herbert@thdev1 ~]$ I would like to simulate this in php using proc_open (instead of shell_exec) in order to have control over return-codes, pipes, etc. So I want something like this: $catPipes=array(); $sortPipes=array(); $cwd = '/tmp'; $env = array(); $catProcess =