helly           Mon Oct  4 13:54:14 2004 EDT

  Added files:                 (Branch: PHP_5_0)
    /php-src/ext/standard/tests/array   bug29992.phpt 
  Log:
  MFH
  

http://cvs.php.net/co.php/php-src/ext/standard/tests/array/bug29992.phpt?r=1.1&p=1
Index: php-src/ext/standard/tests/array/bug29992.phpt
+++ php-src/ext/standard/tests/array/bug29992.phpt
--TEST--
Bug #29992 (foreach by reference corrupts the array)
--FILE--
<?php

$array = array(1,2,3);

print_r($array);

foreach($array as $item) var_dump($item);
foreach($array as &$item) var_dump($item);
foreach($array as &$item) var_dump($item);
foreach($array as $item) var_dump($item);

print_r($array);

?>
===DONE===
--EXPECT--
Array
(
    [0] => 1
    [1] => 2
    [2] => 3
)
int(1)
int(2)
int(3)
int(1)
int(2)
int(3)
int(1)
int(2)
int(3)
int(1)
int(2)
int(3)
Array
(
    [0] => 1
    [1] => 2
    [2] => 3
)
===DONE===

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to