ID:               28999
 Updated by:       [EMAIL PROTECTED]
 Reported By:      danielc at analysisandsolutions dot com
-Status:           Open
+Status:           Closed
 Bug Type:         Unknown/Other Function
 Operating System: Windows 2000
 PHP Version:      5CVS-2004-07-03 (dev)
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


Previous Comments:
------------------------------------------------------------------------

[2004-07-09 22:57:25] danielc at analysisandsolutions dot com

Curt Zirzow posted a patch for this to internals...
http://news.php.net/php.internals/10968

------------------------------------------------------------------------

[2004-07-03 06:05:05] danielc at analysisandsolutions dot com

Description:
------------
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?

I made a post about this to internals:
http://marc.theaimsgroup.com/?l=php-dev&m=108874256229775&w=2

Reproduce code:
---------------
<?php
exec('date', $Return);
exec('date', $Return);
print_r($Return);
?>


Expected result:
----------------
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)
)

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


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=28999&edit=1

Reply via email to