Hi All, I'm writing something in PHP at the moment, and I *really* need bi-directional pipe support, a la IPC::Open2 in Perl.
IPC::Open2 works by returning two filehandles to the command to be run, one which can be written to and it goes to the STDIN of the command that gets run, and one that can be read from to get the output of the command. As far as I can tell, this cannot be done in PHP. passthru() doesn't allow writing to STDIN, apparently this has worked with popen() at some point according to a user comment in the manual, but it doesn't work for me using Linux and Apache. This is a very useful thing to be able to do, as there are many commands under *n?x that you can write to the STDIN of and read processed data from STDOUT, like tar, image processing utilities, tr, etc. I'd like to see this in PHP, and, if it's not there, I'm not opposed to writing to code to do it, since I know how to do this in C. I guess I'm asking: * am I correct that there isn't a way to do this in PHP at the moment? * do people agree that this would be a good thing to have? * if I were to write it, is someone interested in adding it to PHP, and perhaps helping me out with PHP-specific issues? Thanks, KimS -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php