cvs: php-src(PHP_5_0) /ext/standard/tests/array bug29992.phpt
| From: | Marcus Boerger | Date: | Mon, 04 Oct 2004 17:54:14 +0000 |
| Subject: | cvs: php-src(PHP_5_0) /ext/standard/tests/array bug29992.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-28885@lists.php.net to get a copy of this message | ||
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===