ID: 31012
Updated by: [EMAIL PROTECTED]
Reported By: DeyV at php dot pl
-Status: Open
+Status: Feedback
Bug Type: *General Issues
Operating System: win xp
PHP Version: 4.3.10RC1
New Comment:
Please, make sure that you disabled all Zend extensions (Zend Optimizer
etc.) and try again.
Previous Comments:
------------------------------------------------------------------------
[2004-12-07 17:46:53] DeyV at php dot pl
Description:
------------
In this version in foreach without $key parametr, the $value always is
returned as array, when
0 => value
1 => key
Reproduce code:
---------------
$a = array (
1 => 'test1',
2 => 'test2',
"three" => 1,
"four" => 2,
"five" => 3
);
foreach( $a as $v ) {
print $v."\n";
}
var_dump( $v );
Expected result:
----------------
test test2 1 2 3
int(3)
Actual result:
--------------
Array Array Array Array Array
array(2) { [0]=> int(3) [1]=> string(4) "five" }
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31012&edit=1