#31124 [Bgs]: foreach bug for only value
| From: | honestqiao at sohu dot com | Date: | Fri, 17 Dec 2004 01:32:35 +0000 |
| Subject: | #31124 [Bgs]: foreach bug for only value | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-70430@lists.php.net to get a copy of this message | ||
ID: 31124
User updated by: honestqiao at sohu dot com
Reported By: honestqiao at sohu dot com
Status: Bogus
Bug Type: Zend Engine 2 problem
Operating System: Windows NT
PHP Version: 4.3.10
New Comment:
No bugs.
download Zend Optimizer-2.5.7 from
http://www.zend.com/store/products/zend-optimizer.php
http://www.zend.com/store/free_download.php?pid=13
and upgrade/use it for php4.3.10.
It's work well.
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.
Previous Comments:
------------------------------------------------------------------------
[2004-12-16 15:08:10] derick@php.net
See #31123
------------------------------------------------------------------------
[2004-12-16 14:53:00] honestqiao at sohu dot com
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 this bug report at http://bugs.php.net/?id=31124&edit=1