ID:               31012
 Updated by:       [EMAIL PROTECTED]
 Reported By:      DeyV at php dot pl
-Status:           Open
+Status:           Bogus
 Bug Type:         *General Issues
 Operating System: win xp
 PHP Version:      4.3.10RC1
 New Comment:

Not a PHP bug -> bogus.


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

[2004-12-07 22:13:02] DeyV at php dot pl

Interesting. 
Without Zend Optimizer-2.5.5 this work correctly. 

Sorry.

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

[2004-12-07 17:55:29] [EMAIL PROTECTED]

Please, make sure that you disabled all Zend extensions (Zend Optimizer
etc.) and try again.

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

[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

Reply via email to