I am developing a php application that interfaces with an external
executable binary. The program is written in C++.
I open the program (say a.out) using proc_open. Write some command at
its stdin and fetch data stdout. Then close the program.
The timing of only "a.out" is
When I invoke it using proc_open in php-cli, the timing becomes
Look closely, the cpu time and the real elapsed time increases. I run
the php version from command line. As an apache handler this will
surly take more time.
My question is, how can I improve invoking this a.out? Is there any
The command is something like
$ ./a.out --option value --option value < script.txt
The program a.out can not be converted in php unless I write an
extension. But this will need a lot of effort to write it in PHP.
Some of my ideas are,
1. Create a standalone multi-threaded server that calls a.out and php
calls that server.
2. Call a.out as a CGI and convert it that way.
My talks, http://talk.cmyweb.net
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php