Hi:

In PHP 4, when using exec() multiple times with the same array in the 
"output" parameter, the data from subsequent exec() calls appended the new 
results to the existing array.  This is as the manual says.

When PHP 5 first came out, each call to exec() overwrote the prior array.  
At some point a while ago, there was discussion on the list and things 
were changed back to the old behavior.

At some point after that, the arrays started getting overwritten again.  
Is this intentional?

I saw no notices about it in README.PHP4-TO-PHP5-THIN-CHANGES or in the 
man page.

Can the old behavior be reimplemented in order to preserve compatibility?

Here's a test, if you're curious:

<?php
echo phpversion() . "\n";
exec('date', $Return);
exec('date', $Return);
print_r($Return);
?>

4.3.8-dev
Array
(
    [0] => The current date is: Fri 07/02/2004
    [1] => Enter the new date: (mm-dd-yy)
    [2] => The current date is: Fri 07/02/2004
    [3] => Enter the new date: (mm-dd-yy)
)

5.0.0-dev
Array
(
    [0] => The current date is: Fri 07/02/2004
    [1] => Enter the new date: (mm-dd-yy)
)

Thanks,

--Dan

-- 
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
            data intensive web and database programming
                http://www.AnalysisAndSolutions.com/
 4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to