php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24467 PHP 5 didn't parse Array in (for loops)
Submitted: 2003-07-02 15:32 UTC Modified: 2003-07-15 16:35 UTC
From: mingmaster at gmx dot de Assigned:
Status: No Feedback Package: Scripting Engine problem
PHP Version: 5.0.0b1 (beta1) OS: Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2003-07-02 15:32 UTC] mingmaster at gmx dot de
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 )


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-02 15:34 UTC] derick@php.net
Please provide a full self contained script (copy and paste for us should work).
 [2003-07-08 02:04 UTC] arni at ext dot ru
look at this
for($h = 1; $h < 7 ; $h++)
 [2003-07-15 16:35 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 09:01:29 2024 UTC