Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:10867 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59208 invoked by uid 1010); 2 Jul 2004 04:29:20 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 59184 invoked from network); 2 Jul 2004 04:29:20 -0000 Received: from unknown (HELO mail3.panix.com) (166.84.1.74) by pb1.pair.com with SMTP; 2 Jul 2004 04:29:20 -0000 Received: from panix5.panix.com (panix5.panix.com [166.84.1.5]) by mail3.panix.com (Postfix) with ESMTP id 2F76D981E5 for ; Fri, 2 Jul 2004 00:29:20 -0400 (EDT) Received: (from analysis@localhost) by panix5.panix.com (8.11.6p2-a/8.8.8/PanixN1.1) id i624TKu14905 for internals@lists.php.net; Fri, 2 Jul 2004 00:29:20 -0400 (EDT) Date: Fri, 2 Jul 2004 00:29:20 -0400 To: PHP Internals List Message-ID: <20040702042919.GA12698@panix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Subject: exec()'s output array overwritten in PHP 5 From: danielc@analysisandsolutions.com (Daniel Convissor) 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: 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