From: mingmaster at gmx dot de Operating system: Linux PHP version: 5.0.0b1 (beta1) PHP Bug Type: Scripting Engine problem Bug description: PHP 5 didn't parse Array in (for loops)
Description: ------------ PHP 5 didn't parse Array in (for loops) PHP Version 5.0.0b1 Apache/2 ./configure --with-apxs2=/www/bin/apxs --with-mysql=/usr --with-gnu-ld --with-jpeg-dir=/usr/lib --with-tiff-dir=/usr/lib --with-png-dir=/usr/lib --with-zlib=/usr --with-gd --with-zlib-dir=/usr/lib --with-pdflib=/usr --with-sablot=/usr --with-dom-xslt=/usr --with-openssl=/usr --with-freetype-dir=/usr/include/freetype --enable-gd-native-ttf --enable-gd-imgstrttf --with-xpm-dir=/usr/X11R6/ --with-openldap=/usr --enable-fast-install --enable-bcmath --enable-calendar --enable-debug --enable-force-cgi-redirect --with-config-file-path=/www/conf --enable-ftp --with-dom=/usr --with-ming=/usr/lib/ming --with-swf=/usr/lib/swf --with-mcrypt=/usr --with-mm --with-mhash --with-libxml-dir=/usr --with-expat-dir=/usr --with-xsl=/usr Reproduce code: --------------- $zaehle = array_reverse(array_count_values($temp)); print_r($zaehle); // Array ( [3] => 1 [5] => 2 [6] => 6 ) for($h = 1; $h < 7 ; $h++) { $schnitt[$h] = ($h * ($zaehle[$h] ? $zaehle[$h] : 0)); $menge[$h] = ($zaehle[$h] * $satz); } print_r($schnitt); // Array ( [1] => 0 [2] => 0 [3] => 0 [4] => 0 [5] => 0 [6] => 0 ) Expected result: ---------------- // Array ( [1] => 0 [2] => 0 [3] => 0 [4] => 0 [5] => 0 [6] => 0 ) -- Edit bug report at http://bugs.php.net/?id=24467&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=24467&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=24467&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24467&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24467&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24467&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=24467&r=support Expected behavior: http://bugs.php.net/fix.php?id=24467&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=24467&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=24467&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24467&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24467&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24467&r=dst IIS Stability: http://bugs.php.net/fix.php?id=24467&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=24467&r=gnused