From:             honestqiao at sohu dot com
Operating system: Windows NT
PHP version:      4.3.10
PHP Bug Type:     Zend Engine 2 problem
Bug description:  foreach bug for only value

Description:
------------
Run Env 1:
Windows NT LOCALHOST 5.1 build 2600/WinXP SP2 Pro
Apache2.0.52
PHP4.3.10
Zend Optimizer-2.5.5


Run Env 2:
Windows NT XYSTER_WIN2K 5.0 build 2195 
Apache1.3.27
PHP4.3.10
Zend Optimizer-2.1.0

If don't use Zend Optimizer,it's Expected result.
If use Zend Optimizer,it's Actual result.

If use Turck MMCache 2.4.6 , it's Expected result.

Reproduce code:
---------------
<?php
$intArray = array (1, 2, 3, 17);
foreach ($intArray as $value) {
   print "Current value of \$intArray: $value.\n";
}
?>

Expected result:
----------------
Current value of $intArray: 1. 
Current value of $intArray: 2. 
Current value of $intArray: 3. 
Current value of $intArray: 17.


Actual result:
--------------
Current value of $intArray: Array. 
Current value of $intArray: Array. 
Current value of $intArray: Array. 
Current value of $intArray: Array.


-- 
Edit bug report at http://bugs.php.net/?id=31124&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=31124&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=31124&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=31124&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=31124&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=31124&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=31124&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=31124&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=31124&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=31124&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=31124&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=31124&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=31124&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=31124&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=31124&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=31124&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=31124&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=31124&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=31124&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=31124&r=mysqlcfg

Reply via email to