1--TEST--
2Bug #71969 (str_replace returns an incorrect resulting array after a foreach by reference)
3--FILE--
4<?php
5$a = array(
6	array("one" => array("a"=>"0000", "b"=>"1111")),
7);
8
9//foreach by reference, changing the array value
10foreach($a as &$record)
11{
12	$record["one"]["a"] = "2222";
13}
14var_dump(str_replace("2", "3", $a));
15?>
16--EXPECT--
17array(1) {
18  [0]=>
19  array(1) {
20    ["one"]=>
21    array(2) {
22      ["a"]=>
23      string(4) "2222"
24      ["b"]=>
25      string(4) "1111"
26    }
27  }
28}
29