ID:               31143
 Updated by:       [EMAIL PROTECTED]
 Reported By:      tabacco at adventuregamers dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: RH EL3 Kernel 2.4.21-20.0.1.EL
 PHP Version:      4.3.10
 New Comment:

Do not file bugs when you have Zend extensions (zend_extension=)
loaded. Examples are Zend Optimizer, Zend Debugger, Turck MM Cache,
APC, Xdebug and ionCube loader.  These extensions often modify engine
behavior which is not related to PHP itself.




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

[2004-12-17 08:18:16] tabacco at adventuregamers dot com

Okay, apologies, aparently I'm an idiot.  The $value variable is set,
but it's an array.  I wrote up the bug after fixing everything, so I
had to guess at expected output.  Based on a couple of notificatation
e-mails generated during the downtime, the test code given would
actually print:

ArrayArrayArrayArrayArray.

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

[2004-12-17 07:51:00] tabacco at adventuregamers dot com

Description:
------------
When I upgraded to 4.3.10 from 4.3.9, every piece of code on my site
that used foreach() broke.  As near as I can tell, in foreach($array as
$value), $value wasn't being set.  I uninstalled 4.3.10 and reinstalled
4.3.9 and it works beautifully again.  I used the same php.ini all
three times.

Reproduce code:
---------------
<?php
$test_arr = array(1,2,3,4,5);

foreach($test_arr as $number) {

   echo $number;

}
?>

Expected result:
----------------
It should print:

12345

Actual result:
--------------
It prints nothing, and isset($number) returns FALSE.


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


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

Reply via email to