William D. Richards wrote:
Hi, Folks,
Though the command proc_open() is shown as PHP 4.0-4.3 and PHP 5
compatible, the examples given are strictly PHP 5. The documentation
should reflect that issue to avoid confusion.
The key points:
1. proc_open examples are using five fields with the proc_open
function. That only works in PHP 5. PHP 4 can only use the first three.
2. In the first example, the function stream_get_contents() is
used to retrieve the results from the child process.
stream_get_contents() only appears in PHP5.
People who are new to PHP may become frustrated with trying to
learn if an example given works only in PHP5 and they are working on a
system with only PHP 4.3 (or lower) on it, and they are unaware that
there is a difference.
Solution: Add a line before an example that specifies which version
the example is supposed to run in. (ex: "PHP4" or "PHP5" or "PHP4,5",
etc....)
I realize that it creates just yet one more thing to add to the
clutter, but I think it will help in the long run.
Would you mind to file a bug report at bugs.php.net?
Doing so will help us to keep track of the issue and to handle it.
Thanks
Friedhelm