|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-07-02 15:34 UTC] derick@php.net
[2003-07-08 02:04 UTC] arni at ext dot ru
[2003-07-15 16:35 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 23:00:01 2025 UTC |
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 )